I'm trying to make a script to detect Walkspeed changes from the player's Humanoid, i've tried alot of ways of making this work but nothing worked, I'm an amateur lua coder; i started a month ago and im still learning the basics, dont be too harsh on me if its very blatant.
Anyways heres the code (i put the script in serverscriptservice.)
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
if humanoid.WalkSpeed == 16 then
print("normal speed")
while true do
wait(0.1)
if (humanoid.WalkSpeed ~= 16) then
print("modified")
plr:Kick("Kicked")
end
end
end
end)
end)

4 comments
For some reason it did not work. Where did you put the local script by the way?
StarterGui or StarterPlayer... Maybe your walkspeed is 16
I had it in workspace for whatever reason, Thanks alot!
Welcome!