Let's say this is your ClickDetector script:
function click()
--do stuff
end
ClickDetector.MouseClick:connect(click)
Change it to this:
debounce = false
function click()
if debounce == false then
debounce = true
--do stuff
wait(10)
debounce = false
end
end
ClickDetector.MouseClick:connect(click)
That will add a 10 second debounce. |