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

Help with debouncing in function script?

So I'm trying to make a debounce for a script that has 2 main functions in it, on their own, the functions run like they're supposed to. Yet the debounce doesn't do what I want it to. I'm trying to make it so that there's a cooldown after the function is done doing its thing after it's been triggered, but it's not giving the functions any cooldowns and just lets you instantly do it again after the function is done doing what it does. What did I do wrong here?

https://imgur.com/a/TzKqyAx

1 answer

instead of putting the debounce in the function try

while debounce do
wait(15)
debounce = false
end

2 comments

0

Hi, I tried your code. It did not change anything. Please let me know if I did it wrong. https://imgur.com/a/TzKqyAx

0

I also forgot to mention that the picture does not show a piece of code thats above which says local debounce = false local Cyan = script.Parent

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