Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 6 years ago

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?

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. Lugical 425 — 6y
0
^^That’s probably the best way, you could also make fake parts, invis/cancollide off, and use part:GetTouchingParts to ref plr location ABK2017 406 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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

Ad

Answer this question