i made a script that prints the humanoid walkspeed but it says that the humanoid is not a valid member of model, i did also try to print the parent of the model and it says the workspace why why cant i access the humanoid. the script lies in the screengui so i got it on the client side
local player = game:GetService("Players").LocalPlayer print(script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed)
You have to use WaitForChild:
local player = game:GetService("Players").LocalPlayer print(player.Character:WaitForChild("Humanoid")) -- WaitForChild yields the script until it finds the name in the given instance. -- It has 2 arguments: WaitForChild(x, y) x = name of object (string) y = seconds of how long you will want it to yield (optional)