So, I want to make a door that stays open for a certain amount of time (meaning the door would open when a player stands in front of it) and close after a while, for a certain amount of time before becoming open again (meaning the door would stay closed even if the player stands in front of it). Can you please explain the concept behind how to do this? I want to script it myself.
I believe that you are saying about Debounce, it prevents spamming. Here is how you do it
local Debounce = false local function randomfunction() if not Debounce then Debounce = true -- now the script will stop working cause Debounce is true wait(2) Debounce = false end