Humanoid Root part Error

In the script output it says Character is not a valid member of players does anyone know how to fix it?

you didn’t call the character nor player along with incorrect humanoid use

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
-- Humanoid should be called like this

local hum = char:FindFirstChild("HumanoidRootPart") -- or WaitForChild()

?? The problem is that the parameter “Player” is referencing the player’s service, there’s no need to yield CharacterAdded but I guess whatever

1 Like

Sorry trying to learn coding problems, thanks for letting me know.