I've been wondering, what is debounce?
That Question has been Answered by the ROBLOX Wiki. Debounce is something that prevents a function from firing multiple times on execution basically.
I have posted my Comment as an Answer because I was asked to do so, however, I fail to realize why I have to put it as an Answer.
Debounce
will prevent a function from firing rapidly.
Let me give you an example of debounce:
debounce = false --It can be named anything. game.Workspace.SomeRandomPart.Touched:connect(function() if debounce == true then return end -- Ends function if debounce is true. print("This script includes debounce. Did you know that?") wait(2) -- How long until you are allowed to fire this function again end end)
Please upvote and accept my answer if it helped!