Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Put this script inside the Door Brick. :3
- print("Door Script running")
- local door = script.Parent
- local debounce = false
- local debounce2 = false
- function OnClicked()
- if debounce == false then
- debounce = true --to kick off flooding
- door.Transparency = 0.6
- door.CanCollide = false --Door is opening!
- wait(4)
- door.Transparency = 0
- door.CanCollide = true --Door is closed
- debounce = false
- elseif debounce == true and debounce2 == false then --Incase player is impatient and wants to close it himself early. :3
- debounce2 = true --to kick off more flooding
- door.Transparency = 0
- door.CanCollide = true
- wait(4)
- debounce2 = false
- end
- end
- door.ClickDetector.MouseClick:connect(OnClicked)
Advertisement
Add Comment
Please, Sign In to add comment