Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Touching a spawn Disable, then not touching enable?

I know how to disable it,

function OnTouch()
	Spawn.Enabled = false
end

script.Parent.Touched:connect(OnTouch)

but I am wondering how to re-enable it so that when a player walks off the spawn it will enable itself again.

1 answer

✓ Accepted answer

Try

function OnTouch()
    Spawn.Enabled = false
end

function TouchEnd()
	Spawn.Enabled = true
end

script.Parent.Touched:connect(OnTouch)
script.Parent.TouchEnded:connect(TouchEnd) --Ends the touch

This discussion is preserved as it was. New answers, comments, and votes are closed.