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.

2 comments

0

you can use region3

0

Why is 1 your condition?