Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Start = workspace.s.Position
- local End = workspace.e.Position
- local Distance = (End - Start).magnitude;
- local Direction = (End - Start).unit;
- local Parts = 100;
- local Increment = Distance/Parts;
- local AmountOfArcs = 1
- local Amplitude = 5
- for i = 0, Parts do
- local P = Instance.new("Part");
- local PercentOfCompletion = i/Parts;
- local PercentOfSineWave = math.sin(((math.pi*AmountOfArcs) * PercentOfCompletion)) * Amplitude;
- local YAdjustment = PercentOfSineWave * 10
- P.Anchored = true;
- P.Size = Vector3.new(1,1,1);
- P.CFrame = CFrame.new(Start) + (Direction * (Increment * i)) + Vector3.new(0,YAdjustment,0);
- P.Parent = workspace
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement