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

Someone please explain Debounce?

Not a clue what it means, thanks!

2 answers

✓ Accepted answer

Debounce is to prevent multiple signals from being sent to trigger the same function where there would be a problem if the function was called again before it finished.

You can found the best detailed guide at the ROBLOX wiki: http://wiki.roblox.com/index.php/Debounce

In my words, it is simply a set in which when you have a event or something, such as a regen button it activates and will stop the regen button from running again until the regen process or time cooldown is done. So for example:

debounce = false

function onTest()
if not debounce then debounce = true
print("This line will only appear once debounce is false")
wait(3)
debounce = false
print("This function can be executed again")
end
end

1 comment

0

Thanks for the detailed answer! Voted your answer up, 1waffle1 gave a slightly clearer explanation :)

This discussion is preserved as it was. New answers, comments, and votes are closed.