like a millions of people, think magnitude is the only way to detect if the player is speedhacking or not, well they were wrong, somehow humanoid.Running could expose the client walkspeed so we dont need the friggin magnitude anymore, just insert a script in serverscriptservice
and write this
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local oldpos
char.Humanoid.Running:Connect(function(spped)
if (spped > char.Humanoid.WalkSpeed+5) then
char:SetPrimaryPartCFrame(CFrame.new(oldpos))
else
oldpos = char.HumanoidRootPart.Position
end
end)
end)
end)
tell me if you bypassed it
BTW, this dosent detect teleports, just walkspeed so if you want teleport then yes, use magnitude instead.
The player’s walkspeed can change even when they don’t modify it themselves or the server doesn’t modify it. One example of when it can change is when you jump out of a seat which can sometimes fling you slightly which increases the walkspeed. Therefore, this detection is not as reliable as you think it is.
It isn’t less likely to happen as if you try to jump out of a seat, there are many times you may be flung and that’s just one of the many reasons. Also, when did I say you should kick the player? For speed-related hacks, you should take server glitches/client lag or game mechanics into account and just move the player back (when intended) instead of kicking them.
Also, humanoid.Running only detects when the player actually runs so that means that the player can just speed hack when climbing, swimming, etc, without the server detecting it with your method.
(also jumping while running can make the anti-cheat unreliable as it can make the player’s walkspeed increase)
well you can add another check to see if they do it multiple times to reset their walk speed and if it doesn’t fix them reset them or something (you can also reset their velocity when you teleport them back)
I’ve literally never seen or heard of Walk Speed increasing when getting out of a seat, as far as I know unless the seat is poorly designed you shouldn’t be flung nor have increased speed. Sometimes on rare occasions you may be flung but I don’t think your walk speed changes.
(Also i think I know a bypass to this method, something called “Tpwalk” by a popular admin script called infinite yeild)
game.Players.PlayerAdded:Connect(function(plr)
local Running = false
plr.CharacterAdded:Connect(function(Character)
local oldpos
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
if Humanoid then
Humanoid.Running:Connect(function(spped)
Running = true
task.spawn(function()
game:GetService("RunService").Heartbeat:Connect(function()
if (spped > plr.Character.Humanoid.WalkSpeed + 5) and Running == true then
Character:SetPrimaryPartCFrame(CFrame.new(oldpos))
else
oldpos = Character.HumanoidRootPart.Position
end
task.wait()
end)
end)
if spped == 0 then
Running = false
end
end)
end
end)
end)