Any way to determine if a player has covered a large distance over several frames?

I’m trying to develop a basic anti-exploit system, and this includes teleport detection. I initially tried checking the distance between the player’s last and current positions each frame, however this lead to very inconsistent results. It does not seem that the teleportation process of MoveTo is instantaneous. Over the course of several frames after performing a MoveTo call, it prints out a small sequence of numbers nowhere near the distance expected.

Not really sure of how else I could possibly go about this.

Thank you.

1 Like

This is common, I believe it may have something to do with the task scheduler or the physics engine not updating properties at the right time. However, this shouldn’t be a show-stopper. Instead of checking every frame, you can just have it take out the highest recorded velocity in a given time interval and go on from there.

I whipped a demo:


It will print the speed in orange if it passes the 500 mark threshold.

teleportAnticheat.rbxl (50.3 KB)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.