Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
trecept 367 Moderation Voter
6 years ago

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

Log in to vote
0
Answered by 6 years ago
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
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. protectiveebob 221 — 6y
Ad

Answer this question