What could be wrong in this Anti Speed Exploit script?

I am not understanding as to how this anti-over speeding script is not working.

--No Speed
if Anti_Speed == true then
	if Character.Humanoid.Walkspeed > Max_Speed  then
		LocalPlayer:Kick("No Exploit")
	end
end

Instead, am also getting an error telling me that, Walkspeed is not a Valid member of Humanoid, how could I change this script then?

Also, Max_Speed is a local which is defined to 16.

The property is called WalkSpeed. “Walk speed” is two words not one. Also, you might wanna wrap this in a GetPropertyChangedSignal listener

-- Make sure this is under the StarterCharacterScripts
local humanoid = script.Parent:WaitForChild("Humanoid")
local client = game:GetService("Players").LocalPlayer

humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
    if anti_speed and humanoid.WalkSpeed > MAX_SPEED then
        client:Kick("No Exploit")
    end
end)

Do note that this can easily be bypassed and not all exploits use WalkSpeed to go faster. I believe the humanoid.Running even would be more useful on the server.

2 Likes