I have a local script:
game.Players.LocalPlayer.Character.Humanoid.Changed:Connect(function(value) if game.Players.LocalPlayer.Character.Humanoid.WalkSpeed >= 30 then script.Parent.WSG.RemoteEvent:FireServer() end end)
Nothing happens. It's not firing the remote event because I tried adding print("Fired") in the regular script.
I don't understand what you're doing with your code. Humanoid changes lots of times. Why are you listening for the change? Also WalkSpeed likely has a maximum.
There probably is an error causing because the speed is increasing too high. Set a maximum to stop increasing.
I don't recommend doing the checks on the client. Use the PlayerAdded
event and detect from there. It will not prevent a hacker from hacking if you stop their hacking on the client. They can just change it. As for why your current script is not working you can read this. I hope this helps and have a great day scripting!
local Player = game:GetService("Players").LocalPlayer local Char = Player.Character or Player.CharacterAdded:Wait() local Hum = Char:WaitForChild("Humanoid") Hum:GetPropertyChangedSignal("WalkSpeed"):Connect(function(Speed) if (Hum.WalkSpeed > 100) then print("Wow, that's really fast!") end end)
This has to be checked locally as the walkspeed value does not replicate to the server. But it's also really risky as they can just delete the script even if you hide it, it will still be in their memory.
Hope this helped.