Autoclicker Detection not working on mobile

I’m currently making a simple game with mining elements in it. It’s easily broken with an autoclicker, so I added detection against it, but it’s not detecting autoclickers for mobile users.

>   userInputService.InputBegan:Connect(function(input)
	local inputType = input.UserInputType
	if inputType == Enum.UserInputType.MouseButton1 then
		if tick() - last <= 0.05 then 
			--punish the baddie
		end
		last = tick()
	end
end)

How do I detect mobile user clicks?

UserInputType.MouseButton1 works only if the input is done with the left mouse button, as the name states.

If you’re looking to detect touch input, you will also need to look for UserInputType.Touch.

There are lots of people that can actually click this quickly, so this kind of autoclick “detection” would be really frustrating for many players. If I try to hit it, it’s not actually that difficult of a barrier to hit:
image
(bad is in the if statement with “--punish the baddie”, good is under an else statement)

In fact, many tools people use for autoclicking come with a way to set a delay between clicks, so this wouldn’t even be effective against people who really are using an autoclicker.

1 Like