How do I check a player's distance from any point of a part?

I am trying to make a system to check how far a player is from a wall. Unfortunately, using magnitude only checks the distance from the center of a part to the center of another. How would I check the distance of a part from any point on a wall, not just the center of the wall?

1 Like

You could use raycasting:

1 Like

Ah, didn’t think of that. It worked perfectly! Thanks for your response!

1 Like