If the player is in region3, then he writes both "In zone" and "not in zone" at the same time

while wait(1) do
	local Region = Region3.new(script.Parent.Position - script.Parent.Size / 2, script.Parent.Position + script.Parent.Size / 2)
	local IgnoreList = {script.Parent}
	local PartsInRegion = game.Workspace:FindPartsInRegion3WithIgnoreList(Region, IgnoreList, math.huge)

	for i,v in pairs(PartsInRegion) do
		if v then
			if game.Players:FindFirstChild(v.Parent.Name) then
				print("In zone")
			else
				print("Not in")
			end
		end
	end
end

in general, I want to connect the function if the player has left the region3

Region3 has been deprecated for years now. I’d suggest you to look into the module “ZonePlus”, it’s way easier to use and understand.

2 Likes