Advertisement
tusKOr661

Arc k

Jun 3rd, 2014
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local function arc(Start,Finish,Height)
  2.     Height=Height or (Start.p-Finish.p).magnitude/10;
  3.     local cLerp=function(a,b,i)
  4.         return a:lerp(b,i)+Vector3.new(0,math.sin(i*3)*Height,0);
  5.     end;
  6.     for i=0,1,.05 do
  7.         local old,new;new=cLerp(Start.p,Finish.p,i+.05);old=cLerp(Start.p,Finish.p,i);
  8.         local real=CFrame.new(old,new);
  9.         local dist=(old-new).magnitude;
  10.         local line=Instance.new'Part';
  11.             line.Anchored,line.FormFactor,line.Size,line.CFrame,line.Parent=true,'Custom',Vector3.new(0,0,dist),CFrame.new(old,new)*CFrame.new(0,0,-dist/2),workspace;
  12.     end;
  13. end;
  14. arc(CFrame.new(0,5,0),CFrame.new(0,5,-25),15);--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement