Trusting The Client With WalkSpeed

Is it okay to trust the client with changes to the Humanoid such as WalkSpeed? I’m pretty they can already change it and it will replicate. Of course I would still have server sided speed checks and things like that. Thanks in advance.

WalkSpeed does not replicated from Client to Server when the Client updates it.

1 Like

I am pretty sure walkspeed is safe, if its for short things.
But never trust the client, always use checks as you said.

2 Likes

No, never trust the client. The client is able to spoof walkspeed or any changes to their character.

Scripts similar to this can allow them to return a fake value.

local mt = getrawmetatable(game)

setreadonly(mt, false)
local old = mt.__index

mt.__index = function(o, k)
 if tostring(o) == "Humanoid" and tostring(k) == "WalkSpeed" then
     return 16 --Returns value as 16
   end

 return old(o, k)
end

Depends on how varied walk speeds are in your game.

If they don’t vary that much, using server-sided checks are ideal.

If they vary a lot (e.g., speeds rapidly changing when players are using abilities, sprinting, etc) then using server-sided checks are not reliable. Setting speeds on server is only going to make the client’s experience delayed, and clients can change their own walk speed anyway. At this point, you just have to let the client change their walk speed, and rely on a votekick system, or moderator system, to remove exploiters.

1 Like