Basic Username Tag not working

So this is my second problem i ran into today and it’s about making an basic username tag. I don’t know what is causing this error since it’s really basic and i can’t figure it out which makes me embarrased but that’s fine since im still in the learning phase.

(The code is not working)

code:

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function()
		local NewTag = Rank:Clone()
		local Character = Player.Character
		NewTag.Parent = Character:FindFirstChild("Head")
		NewTag.User.Text = Player.Name
		NewTag.User.Back.Text = NewTag.User.Text
	end)
end)

There are no errors in the output!

Are you sure that the UI is not being parented? I’ve come across problems with Billboard UIs in the past because I simply did not see them due to them being hidden behind an object. Also, are you sure the Adornee is not set to another object? The only issue I see with the code is the possibility of the FindFirstChild not actually finding the head and, in turn, setting the parent to nil, but the character is loaded, so I doubt that is the issue.

It’s not appearing anywhere but when i searched on some common problems it turns out that it can’t find the head and basically just dissapears, so you are right

1 Like

I see. Then a simple solution to this is to replace FindFIrstChild with WaitForChild to ensure that a head does indeed exist. Regardless, I’m glad I could help.

1 Like

Thank you :slight_smile:
I tried making it parent to characters head and then after 5 seconds to workspace but
it failed giving me this error, so now i know that it’s not parented to anything
Screenshot 2022-12-20 205620

1 Like

I just figured out whole script works for R6! It for some reason breaks on R15 tho?
I just wanted to inform you about that since it’s really weird but im still happy that it’s working so thank you.

1 Like

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