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.
✓ ANSWER ACCEPTED
[SOLVED] How would you make a timed door that opens and closes at a certain amount of time?
1 answer
✓ Accepted answer
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
This discussion is preserved as it was. New answers, comments, and votes are closed.
