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

How to detect when a player has moved too quickly in a step?

So I'm creating my own anti-exploit, and I've been able to prevent walkspeed changes, flying etc. The only problem I have is with teleporting. When an exploiter teleports to another player, what would I want to use to detect when a player has moved too far in one step?

1 answer

while true do
local Prev;
Prev = game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").Position
wait(1)
if (Prev-game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").Position).magnitude > 20 then
print("Is exploiting?")
end
end

1 comment

0

On the right track, and this also takes care of the walkspeed detection, only problem you'll run into if you use this is that a player, when free-falling, can easily move faster than 20 studs/second.

This discussion is preserved as it was. New answers, comments, and votes are closed.