Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

attempt to index nil with 'FindFirstChild', what does this error mean?

I'm trying to use the FindFirstChild on the player in the workspace.

local h = PhysicalPlayer:FindFirstChild("Humanoid")

However, I get the error: local h = PhysicalPlayer:FindFirstChild("Humanoid"), which makes no sense to me.

Please explain.

1 comment

0

Can you show us the rest of the code? (What physical player is) and what type of script is this? (local or server script)

1 answer

Maybe do character:WaitForChild('Humanoid', 5) as the character may be taking too long to load?

1 comment

0

or it might be the character dat not loaded, not the humanoid so uh wait for character?

This discussion is preserved as it was. New answers, comments, and votes are closed.