Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how can i stop a script from running more than once before it completely executes?

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?

1 comment

0

Can you please provide the script?

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.