Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. local A, B = script.Parent.A, script.Parent.B
  2.  
  3. local segs = 1
  4.  
  5. local vec3 = Vector3.new
  6. local cfrm = CFrame.new
  7. local floor = math.floor
  8. local ceil = math.ceil
  9.  
  10. function drawLine ()
  11. local psize = (B.Position - A.Position).magnitude
  12.  
  13. local p = Instance.new("Part")
  14. p.Anchored = true
  15. p.Size = vec3(1, 1, psize)
  16. p.CFrame = cfrm(A.Position) * cfrm(0, 0, (B.Position - A.Position).magnitude /2)
  17. p.Parent = script.Parent
  18. print(psize)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement