local Tool = script.Parent
local Character = script.Parent.Parent
local Humanoid = Character.Humanoid
local Walkspeed = Humanoid.Walkspeed
if (Tool.Enabled == true)
then return true
end
if (Tool.Enabled == false)
then return false
end
if (Tool.Enabled == true)
then Walkspeed = 30
end
COMMUNITY QUESTION
Whats wrong with my script?
1 answer
local Tool = script.Parent
local Character = script.Parent.Parent.Character
local Humanoid = Character.Humanoid -- you need to reach the players character before being able to change humandoid stats.
local Walkspeed = Humanoid.Walkspeed
if (Tool.Enabled == true)
then return true
end
if (Tool.Enabled == false)
then return false
end
if (Tool.Enabled == true)
then Walkspeed = 30
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
how would i reach the players character?
just copy the script, i head to change
local Character = script.Parent.Parent to local Character = script.Parent.Parent.Character this should make it work
doesnt work