Disclaimer: Client input is always going to be something that the client can exploit.
There are a few ways you could go about this depending on the situation. If the issue is how rapidly the client is clicking then one way would be to record and report clicks per second, for example. This could be done in a number of ways.
If the problem is that users are using an autoclicker to click once every few seconds, or anything within the realm of being possible by a human you’re pretty much out of luck there. You could come up with something to determine if the player might be idle and then present them with a “I’m still here” prompt placed randomly on their screen.
Depending on your situation there’s plenty of ways to go about doing this. But none of them are worth doing. Not to be that guy who tells people about client-side detection methods being a lost cause ad nauseum but it’s very true here. Nothing you do is going to prevent them from simply bypassing it with a script. They can easily spoof remote events and get around any counter measures you’re bothering to implement.
I think in cases like this it’s important to ask yourself how badly this is impacting your game. Is it a big enough problem to warrant a game of cat and mouse? In most cases I would argue that the impact the game is negligible and only impacts that singular player’s experience.
Record time with tick() and then record the number of clicks to whatever is being clicked, if too many clicks are registered in too short of a time span then kick the player.
Of course it can be bypassed in the end however there are multiple methods to prevent against this. You are simply trying to make something that logs client input and disconnects them. It requires 0 input/action/response from the server so just do your research and you’d be fine.
just because anything client sided can be manipulated doesn’t mean you shouldn’t bother. yes eventually your games anticheat will get bypassed and you will have to deal with the issue, yet theirs some games on roblox who have managed to last years with client sided anticheat before exploiters could figure out a way to bypass it. idk where people get the idea theirs no point in client sided anti-cheat because then you’re just restricting yourself from having the game the way you want it to be. P.s a good way of ensuring your client sided anti cheat doesn’t get bypassed in less than 2 hours is if you’re going to make a game that is worth the time to play then make it paid access and ensure trailers and sneak peak content to bring in a concurrency, if you’re game is low effort or comparable to a cash grab e.g traditional simulator then i wouldn’t bother with anti cheat at all cause 1) if they are to use a auto clicker the only person being effected is them ruining their own experience and not getting satisfaction. 2) it isn’t going to cause you to lose concurrency.
tldr: if your games low effort don’t bother, if your games good apply client sided anticheat make sure it’s well made and not something that can just be removed or found in seconds
your initial posts first two words are “don’t bother” then you proceed to say “if you feel it’s worth your time to deal with cheating go for it” reply was mainly focused on clearing up for anyone reading as you clearly came across at “it’s a waste of time because no matter what you do it’ll get bypassed but go ahead if you thinks it’s worth the time to make something that will just end up being bypassed” - my interpretation from reading both ur posts Again since ur curious if i read them or not
If you believe your game is high-effort, has a lot of content, and would be predicted to have a high concurrency and worthwhile gameplay then add client sided anticheat. if you think otherwise then don’t waste time on it.
I thought of this once but what about the rare chance that a player actually clicks a mouse that fast (on accident or on purpose) and gets banned. That would really suck for the innocent player.
A concept I had, never made it an actual thing, would be monitor the rate of clicking over an extended period of time. A human is not capable of clicking perfectly every second. A machine obviously won’t be right on the dot, but you can add a threshold. Clicks should be monitored over a lengthened period of time, not based on clicks-per-second. If you have consistent clicking over the course of 5-10 seconds, it’s pretty safe to assume it’s not a normal person.
Autoclickers can only be detected with the client, and as such, can be bypassed by exploiters. Don’t bother implementing click timing into remotes either due to latency.
You can’t stop an exploiter from bypassing the click timing, but you can stop a normal player from whipping out the classic AutoClicker.exe.
I don’t think it’s a good idea to directly kick a player for auto clicking or even clicking fast. Just send to the server that they did that so the game can handle it properly. Maybe even a alert on the client, but direct moderation like kicking is not needed.
Found it here:
Hope this helps you @ValiantWind
Add a script into server script service:
game.Players.PlayerAdded:Connect(function(Player)
local CPS = Instance.new("IntValue", Player)
CPS.Name = "CPS"
end)
next a local script to startergui to add 1 to the cps, and kick them if its 25
local Mouse = game.Players.LocalPlayer:GetMouse()
local CPS = game.Players.LocalPlayer:WaitForChild("CPS")
CPS.Changed:Connect(function()
if CPS.Value == 25 then
game.Players.LocalPlayer:Kick("You have been kicked for auto clicking.")
end
end)
Mouse.Button1Down:Connect(function()
print("e")
CPS.Value = CPS.Value +1
end)
while true do
wait(1)
CPS.Value = 0
end