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

How to check if a player is in certain region?

Asked by
NorteX_tv 101
5 years ago

I have a while 1 do loop, and I need to check if player is in certain area. I've tried Touched and TouchEnded, but this returns a bunch of messages when a player steps. I don't want it! Can I do something like this?

while 1 do
    if (plr.IsInRegion == "region") then
        print("This message is printed out every 1 second IF player is in region.")
    end
    wait(1)
end

Setting something like this:

part.Touched:Connect(function()
    --Here setting variables to make loop go through
end)

is not effective, as this sets it to true/false/true/false/true/false/true/false/true/false/true/false/true/false/true/false/true/false/true/false/true/false/true/false/true/false/true/false/true/false when player steps over and over and it's just a fact of random what is choosed.

0
you can use region3 theking48989987 2147 — 5y
0
Why is 1 your condition? User#19524 175 — 5y

Answer this question