Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

ClosestPoint not working correctly?

Okay, so I just did a simple Raycast, with .unit (only subtracted about 1.5 from the y after using it) and multiplied it by 50. I had it do FindPartOnRay, and then used ClosestPoint on the intersection point, and it gave me a crazy number that's way off. Why would this happen?

5 comments

1

From the wiki: The ray must be a unit ray!

0

So does that mean I have to use .unit on it again to figure it out?

1

Ray.Unit will return to you a Unit ray, try using Closest point on that. Although, that might not be a problem, it would help if you posted some of your code.

0

That seems to have worked, but they're not the exact. I guess I could just do math.floor to fix that

0

I'm guessing they're not exact due to rounding from converting it back to a unit ray

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.