Advertisement
Guest User

Untitled

a guest
Jun 15th, 2016
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. local start,finish = workspace.Part1,workspace.Part2
  2. local castRate,castRadius = 12,4;
  3.  
  4. for i = 1,castRate do
  5. local step = i * (360/castRate);
  6. local _end = (finish.CFrame * CFrame.Angles(0,math.rad(step),0) * CFrame.new(0,0,-castRadius));
  7. local ray = Ray.new(
  8. start.CFrame.p,
  9. (_end.p - start.CFrame.p).unit * 300
  10. )
  11. local dist = (start.CFrame.p - _end.p).magnitude;
  12. local p = Instance.new("Part", workspace);
  13. p.BrickColor = BrickColor.new("Bright red");
  14. p.FormFactor = "Custom";
  15. p.Material = "Neon";
  16. p.Transparency = 0.25;
  17. p.Anchored = true;
  18. p.Locked = true;
  19. p.CanCollide = false;
  20. p.Size = Vector3.new(0.3, 0.3, dist);
  21. p.CFrame = CFrame.new(start.CFrame.p, _end.p) * CFrame.new(0, 0, -dist / 2);
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement