How do I stop spam clicking?

Hi, I’m making a cart ride game but I can’t stop spam clickers and I’m not sure what to do.
I’ve tried using wait but that didn’t work and I have no idea how to set up the other ones.
Script I have:


Thanks for your help.

2 Likes

Hm you are not even using the “debounce” variable
At line 32, you can add an if statement to check debounce, it would become like this

if not debounce then
 debounce = true
 checkGamePass()
 wait(5) -- cd whatever you want
 debounce = false
end

Your debounce is not even being used. This is how most do it:

local Debounce = false
local Cooldown = 1

local function DoSomething() 
if Debounce then return end
Debounce = true

--Code here
task.wait(Cooldown) 
Debounce = false
end

Same time post is crazy

1 Like

Finally figured out how to set it up but THANK YOU!!! It actually works now!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.