Here is the script:
Runner.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
local p = game.Players:getPlayerFromCharacter(hit.Parent)
if p.leaderstats.Class.Value == "Gunner"
then p.leaderstats.Class.Value = "Runner"
if p.leaderstats.Class.Value == "Runner" then
p.Character:FindFirstChild("Humanoid").WalkSpeed.Value = 24
if p.StarterGear.Tool ~= nil then
p.StarterGear.Tool:Destroy()
end
end
end
end
end)
The error is at line 9 and the outputs returns me: Workspace.Runner.Script:9: attempt to index field 'WalkSpeed' (a number value)
What is the error and how can I fix it?

5 comments
Change StarterGear to Backpack
THats not my problem right now.. I am trying to change the walkspeed that part works but the walkspeed does not
When changing the WalkSpeed of a player you do not do .Value you just do game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 24
^ Note that I am not saying that is exactly how you are going to script it, I am just giving an example to as why you don't put the .Value
Ok thanks