|
| 02 Oct 2016 03:02 PM |
| Distance between two objects..? |
|
|
| Report Abuse |
|
|
DataRoot
|
  |
| Joined: 07 Apr 2016 |
| Total Posts: 586 |
|
|
| 02 Oct 2016 03:02 PM |
| This has all the answers: https://www.youtube.com/watch?v=OLuvQoF1o58 |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 03:03 PM |
local distance = (thing1.Position-thing2.Position).magnitude
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 03:03 PM |
local dist = (obj1.Position - obj2.Position).magnitude part.Size = Vector3.new(dist, 1, 1)
you may want to change the components for the Size depending on what you want. |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 03:12 PM |
I'm trying to use something like:
local dist = ((c1 - c2).magnitude) arm1.Size = Vector3.new(arm1.Size.X, arm1.Size.Y, dist) local dis2t = ((p1 - p1).magnitude) arm3.Size = Vector3.new(arm3.Size.X, arm3.Size.Y, dis2t)
But its not quite working:
https://www.roblox.com/games/508523310/other-place |
|
|
| Report Abuse |
|
|
| |
|