Hello, Community.
I want to make an object that speeds you, I scripted this script for the object [ServerSided Script]:
local tool = script.Parent
local character = game:GetService("Players").LocalPlayer.Character
local backpack = game:GetService("Players").LocalPlayer.Backpack
tool.Equipped:Connect(function()
if character.Humanoid.WalkSpeed == 16 then
character.Humanoid.WalkSpeed = 32
end
end)
tool.Unequipped:Connect(function()
if character.Humanoid.WalkSpeed == 32 then
character.Humanoid.WalkSpeed = 16
end
end)
It doesn't prints out an error, It's not even working!
Trying to help me will make me appreciated!

1 comment
Serversided scripts can't access the LocalPlayer variable that is something only localscripts can do. Try the same script as a localscript in the tool.