humanoid.WalkSpeed.Changed:connect(function() if humanoid.WalkSpeed ~= 16 then player:Kick() end end)
I'm trying to make an anti-speed exploit script so when the exploiter changes their walkspeed to something other than 16 it kicks them. The only thing I'm having problems with is how to detect when the walkspeed is changed. Whenever I use .changed for the walkspeed it gives me this error:
attempt to index field 'WalkSpeed' (a number value)
How can I detect when walkspeed is changed?
Changed is a specific event for each instance. WalkSpeed is not an instance. Alternative:
humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function() if humanoid.WalkSpeed ~= 16 then player:Kick() end end)