local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:FindFirstChild("Humanoid")
print(player.leaderstats.Speed.Value) -- Prints 0
print(char.humanoid) -- humanoid is not a valid member of Model
local leaderstats = player:FindFirstChild("leaderstats")
local speed = leaderstats:FindFirstChild("Speed")

humanoid.WalkSpeed = humanoid.WalkSpeed + speed.Value

error in output:- humanoid is not a valid member of Model... so humanoid isn't inside character? without this I'm unable to find humanoid and WalkSpeed. local script inside StarterCharacterScripts.

7 comments

0

It is char.Humanoid with an uppercase H

0

No, the problem is that he stated local humanoid = char:FindFirstChild("Humanoid") and then called char.humanoid again. Basically what you're saying is print(char.char.Humanoid)

0

oh... Thaks man, it worked

0

no

0

the both ways worked

0

It could be the issue of the object not loading in time when the script executed; try using WaitForChild.

0

Nvm, misread. lol