Hello, I have a problem with character children because everytime I try to get something such as the Humanoid, it says it didn’t load in time. I put in stuff like
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char.Humanoid
even if I “waitforchild” on the item, it doesn’t work. I have tried countless waits and connects but it never works. Does anybody know how to do this? It doesn’t even work for body parts, even the humanoidrootpart.
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
character = player.CharacterAdded:wait()
end
Use waitforchild with the humanoid too
like how I did in my reply above.
Humanoid doesn’t load at the same time the character does, so the script tries to grab the humanoid before it is loaded.