local char = game.Players.LocalPLayer.Character
script.Parent.Equipped:Connect(function()
char.Humanoid.WalkSpeed = 12
print(char.Humanoid.WalkSpeed.."is the walk speed when equiped")
end)
script.Parent.Unequipped:Connect(function()
char.Humanoid.WalkSpeed = 16
print(char.Humanoid.WalkSpeed.."is the walk speed when unequiped")
end)
try some debugging and see if it prints what is expected
local plr = game.Players.LocalPlayer
local char = plr.CharacterAdded:Wait()
script.Parent.Equipped:Connect(function()
char.Humanoid.WalkSpeed = 12
print(char.Humanoid.WalkSpeed.."is the walk speed when equiped")
end)
script.Parent.Unequipped:Connect(function()
char.Humanoid.WalkSpeed = 16
print(char.Humanoid.WalkSpeed.."is the walk speed when unequiped")
end)
@ZINTICK 's code is right, but you gotta wait for the character to load in order for the code to run sometimes since the script can sometimes begin running before anything physical loads in the game.
I modified his code just adding a wait on top. I tested that and it worked for me. Should work for you.