If a player click a button, then it opens and when the player get in, it will close.
--Simple Version local ting = 0 function OnCLick() if ting == 0 then ting = 1 game.Workspace.Door.CanCollide = false wait(2) game.Workspace.Door.CanCollide = true local ting = 0 end end script.Parent.ClickDetector.MouseClick:connect(OnCLick)
Put this script inside of the button with Click Detector
Create a block in workspace called Door Make sure its anchored