Speed / flying anti-cheat help

Yo so I spent 13 hours creating an anti-cheat against exploiters who increase their speed or fly really fast. My goal isn’t to 100% eliminate speed exploiting, but to mostly reduce it.

Here’s my method:

  1. Tracking every player’s CFrame at 60 times a second for up to 2 seconds
  2. Compare the distance between the latest and second latest CFrame
  3. if movement detected is too fast, add it to a counter that resets every 9 seconds
  4. Every 3 seconds check if that counter has reached 90 (because sometimes the system falsely thinks the player moving too fast)
  5. Kick them

The issue is, in a 40 player server, most players started noticing performance issues because each player who is playing a match is being tracked at 60 FPS.

What better ways can I go about this? Is 60 fps too fast? I appreciate all the help I can get.

Try not checking so much.. This should be a permanent ban anyways, so take your time.

1 Like

Alright thanks, I’m going to try 10 times a second instead of 60.

1 Like

the way i would go on about it is dropping that check rate down to maybe twice a second since 60 is destroying your performance, and i’d suggest rubberbanding them back instead of kicking so you don’t lose players who just have bad wifi

Once every 15 seconds should cover it, and it would be nice if they were all on different timing.

alright, also what do you mean by rubberbanding, like averaging it out?

fr? id do it at least once second O_o

rubberbanding means forcefully setting their CFrame back to the last valid position you tracked

oh alright I understand, that seems like a better idea

it is! it’s basically standard practice for any movement anticheat.

in other words; never kick for speed checks because lag spikes cause false flags

yeah i switched my wifi on and off to see what would happen, and the detection thought I was speed cheating lol. thanks, ima give it a try later

ServerAuthority

1 Like

Note that if you decide to use server authority, you might have to rewrite some scripts, for example if you want to apply impulses to the character or if you want to change some of their properties, everything except for animation playing will have to be done on the server