Why is char.Head returning as nil?

No dice.

local head = char:FindFirstChild(Head)

returning

Argument 1 missing or nil


Where did Head go.

EDIT: Changing char:FindFirstChild(Head) to char:FindFirstChild("Head") works but the same issue from before arises.

local nameLabel = nameGui:FindFirstChild("NameLabel")
returns
ServerScriptService.ChangeNameScript:18: attempt to index nil with 'FindFirstChild'

(ignore that “BioLabel” etc is suddenly “NameLabel” theyre. the same script.)

nameGui is returning nil. Not head. If head were nil you would get an error where you define nameGui. This means BioGui is not parented to the player’s head when you call it.

Except I do parent it to the head in another script.

nameGui.Name = "BioGui"
nameGui.Parent = char.Head

(I’ve already called char here: plr.CharacterAdded:Connect(function(char))

when do you parent it? I’m assuming that these scripts aren’t coordinating with one another. The first script could be trying to get the biogui before the other has parented it

local char = plr.Character or plr.CharacterAdded:Wait()
local head = char:WaitForChild("Head")
local nameGui = head:FindFirstChild("BioGui")

When the player joins the game, BioGui should create itself and parent itself to the Head.

game.Players.PlayerAdded:Connect(function(plr)


	plr.CharacterAdded:Connect(function(char)


		local nameGui = Instance.new("BillboardGui")

		nameGui.StudsOffset = Vector3.new(0, 3, 0)

		nameGui.Size = UDim2.new(0, 200, 0, 50)

		nameGui.Name = "BioGui"
		nameGui.Parent = char.Head

		nameGui.MaxDistance = 100

When the player wants to change the text on this it will send the info via RemoteEvent after the player clicks on the confirm button.
Don’t understand how this could unsync…

This works perfectly fine on an older game of mine still. Hm.

try changing last line to this

local nameGui = head:WaitForChild("BioGui", 10)

are any of the two scripts you mentioned local scripts? because if you create the gui in a local script it wont replicate to the server

No dice, same error.

local nameGui = head:FindFirstChild("BioGui")

local nameLabel = nameGui:FindFirstChild("BioLabel")

returns
ServerScriptService.ChangeBioScript:18: attempt to index nil with 'FindFirstChild'

that looks the same. Change it to wait for child

local nameLabel = nameGui:WaitForChild("BioLabel")

Change this too

Aaand still returns the same thing, just swap “FindFirstChild” with “WaitForChild” in the error message.
What on earth.

Should I just drop my full scripts here and see if the issue lies somewhere else?

Change everything from FindFirstChild to WaitForChild

That’s what made that error return that way.

The same error?
Send me the line that errors

did you change the nameLabel variable and the nameGui variable?

----edit----
they both should be waitforchild

local head = char:WaitForChild("Head")

local nameGui = head:WaitForChild("BioGui", 10)

local nameLabel = nameGui:WaitForChild("BioLabel")

Just start the game and check if at all the head and guis exist using the explorer

theres no way you’re still getting the same error msg. If nameGui was nil youd get a different error saying theres an infinite loop. If you are still getting the same exact error msg then either line 17 is different than what you sent or nameGui is getting deleted

I sure exist and my Head sure exists. However, BioGui didn’t appear to parent to my Head…

But the script I posted here should parent it just fine, right?