Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would you make a anti-AutoClicker?

I'm currently working on a game that involves clicking, on the clickdetector can I use a anti-autoclicker somehow?

2 comments

0

debounce

0

ClickDetector.MaxActivationDistance = 0

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.