Can someone explain what a debounce is and how does it work?
It's basically a variable that prevents an event from going on and on. Here's an example:
Say you want to give a player Money:
debounce = false --true or false, doesn't matter script.Parent.Touched:connect(function(player) --The brick gets touched and calls the player if debounce == false then --Checks to see if it is false debounce = true --Now no one can touch the brick until debounce = false --Code to give player Money wait(10) debounce = false --Waits 10 seconds before the brick can give money again. end end)
I hope that I've answered your question :D.