i have a script that detects chat input (the word "start"), but if you type start before the script finishes, it executes another time, is it possible to avoid the script from executing again if it hasn't already finished running?
COMMUNITY QUESTION
how can i stop a script from running more than once before it completely executes?
1 answer
You can check for when the chat input happens and do the following:
if Boolean == true then return end
Boolean = true
And put this on line one, or any available line at the beginning of your script
local Boolean = false
Also known as a debounce
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Can you please provide the script?