I'm currently working on a game that involves clicking, on the clickdetector can I use a anti-autoclicker somehow?
COMMUNITY QUESTION
How would you make a anti-AutoClicker?
1 answer
A very simple solution is to just have a boolean determine if the player is allowed to click again.
local canClick = true -- defaults to letting the player click
Button.MouseButton1Down:Connect(function()
if canClick then -- check if they can
canClick = false -- they just clicked, set it to false
-- do stuff
canClick = true -- maybe wait before setting it to true if you want
end
end)
The above example is for a UI button, but the same logic would work with a ClickDetector (the only difference would be the event).
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
debounce
ClickDetector.MaxActivationDistance = 0