RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"door control system"
--local script local isOpen = false function openDoor() isOpen = true script.Parent.Parent.Door.Doorway.CanCollide = false script.DoorOpen:Play() end function closeDoor() isOpen = false script.Parent.Parent.Door.Doorway.CanCollide = true script.DoorClose:Play() end function onClicked() if isOpen == true then closeDoor() else openDoor() end end script.Parent.ClickDetector.MouseClick:connect(onClicked)