I simply want to know how do you find the Z distance ( z being the position.Z property) between two parts
✓ ANSWER ACCEPTED
How do i find the Z distance between two parts?
1 answer
✓ Accepted answer
Hello y0ucef123, I just want to point out that this isn't a request website, but I can still try to help you because it seems that you are lost and do not know where to start.
In order to find the distance between two parts you can use Magnitude
To find the distance simply do:
distance = (part1.Position - part2.Position).magnitude
print(distance)
I hope this is what you were looking for and be sure to check the ROBLOX Wiki when you feel lost.
Thanks and be sure to accept answer if this works!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Simply subtract the z components of the position vectors.