Script
local part = script.Parent part.Touched:Connect(function() print("Player is in") end) part.TouchEnded:Connect(function() print("player is out") end)
so my problem here is, if i walked in the part it spam print both the touched and touchendded. if i don't walk it doen't print anything, i want it to print once if the player is inside the block. and i want it also to print once if the player is outside the block. after this is solved im going to make map voting. --------//if you can't understand this! im saying is if i walked to the part it spam print the touched and touchendded for some reason. i want it to print once.
This should work.Don't hesitate to tell me if you got any errors.
local part = script.Parent local DebounceEnter = false part.Touched:Connect(function() if DebounceEnter == false then DebounceEnter = true print("Player is in") end) part.TouchEnded:Connect(function() if DebouncEnter == true then DebounceEnter = false print("player is out") end)