I would like to know if there is a way to check the distance between your HumanoidRootPart and other bricks in the game. If there is please help guide me in that direction. I am not asking for a script.
✓ ANSWER ACCEPTED
Is there any way to check the distance between you and a brick?
1 answer
✓ Accepted answer
There is a way. By using magnitude you can find the distance between a character's HumanoidRootPart and another brick in workspace.
Basically, all you have to do to get the distance is this
local distance = (workspace.Player.HumanoidRootPart.Position - workspace.Part.Position).magnitude
This will give you a distance in studs.
3 comments
0
I forgot a reference, but here it is. https://wiki.roblox.com/index.php?title=Magnitude
1
would you be able to do this with multiple parts?
0
iterate through them
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
https://wiki.roblox.com/index.php?title=API:Class/Player/DistanceFromCharacter Where the Vector3 is, put your brick's position