Character's children are all nil?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I’m just trying to get any of the players characters children aka “Head” or “HumanoidRootPart”

  1. What is the issue? Include screenshots / videos if possible!

i ran a for loop through the characters children and it prints out everything except body parts

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

ive tried local char = player.Character or player.CharacterAdded:Wait() and
local char = player.Character basically the stuff that used to work perfectly fine for me is no longer doing it. Maybe I’m just missing something.

here is my code

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

for i,v in pairs(char:GetChildren()) do
	print(v.Name)
end 

the output simply just shows this

is there a bug? I’m really stuck on this simple thing that has never caused me an issue before but any help is appreciated :smiley:

When CharacterAdded runs, not all objects have loaded in yet. You can run char:WaitForChild("Head") to wait for the head.

1 Like

wow literally not what i expected to fix it but this made all of the other body parts print out as well! thank you so much for your help :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.