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

How do I find the players position to be used in an IF statement?

I want to make an IF statement that only runs when the player is in a certain position, could someone tell me how to do this?

2 comments

0

Considering that ROBLOX measures CFrames by the thousandths/hundredths of a stud, it'd be really hard to do it with the way you mentioned above. Have you considered making a part at the place and making a touched function.

0

^^That’s probably the best way, you could also make fake parts, invis/cancollide off, and use part:GetTouchingParts to ref plr location

1 answer

✓ Accepted answer

Checking if they are in a specific position might be quite tricky. Not checking if they are there but the fact you need to have the exact correct rotation and position. You could check if its on the same stud but I propose you check up on Magnitude

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