Nametag billboard gui not working

I created a nametag system a while back, and it was working for a while but suddenly stopped working, (I may have accidentally edited).

I tried look at the script but couldn’t find anything wrong. The script is in server script service.
Code:

local nametag = game:GetService("ServerStorage").NameTagGui

game.Players.PlayerAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		local cloneTag = nametag:Clone()
		cloneTag.Parent = char.Head
		cloneTag.TextLabel1.Text = plr.DisplayName
		cloneTag.TextLabel3.Text = "@"..plr.Name
	end)
end)

I’ve already attempted moving it to a blank baseplate in case another script was interfering, still didn’t show. Doesn’t show as a child under my character’s head, no errors in console.

(I tried manually copying it over, it showed)

simplified version with all the scripts and important assets:
Nametag stuff.rbxm (5.4 KB)

1 Like

I am pretty sure luau is cap sensitive, try :Connect()

Might not work, just want to see

1 Like

We won’t be able to find the issue from this script alone. The script has no issues, so the only issues could be that you’re referencing the wrong stuff.

Try play testing and pressing F9 to check the dev console for errors (or just have the output window open)

2 Likes

Didn’t seem to fix the issue unfortunately

1 Like

There aren’t any errors in the console, also tried using print statements, all of ran

2 Likes

I just recreated the scenario and it worked fine… Did you check the explorer in playtesting to make sure there was no gui in your head that might’ve been invisible?

1 Like

I didn’t see anything under head in explorer, also tried searching for it, but couldn’t find it.

1 Like

Just to be clear…
image
Your explorer looks like this, right?

1 Like

Yes it does, here’s an image for reference:
ntghier

1 Like

:upside_down_face: I’ve got no idea then, but gl figuring it out

1 Like

Just tried your script, doesn’t seem to be because the player is loading in before the script.

Here’s the file for reference (it has all the scripts and assets that the scripts effect)
Nametag stuff.rbxm (5.4 KB)

No it doesn’t c h a r l i m i t

Works for me too. charscharschars

It seems it’s something to do with head meshes, when I unequipped my head package it seemed to fix itself. I tried equipping an rthro head later to test it, didn’t work.

local nametag = game:GetService("ServerStorage").NameTagGui

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		repeat wait(.1) until plr:HasAppearanceLoaded() == true
		local cloneTag = nametag:Clone()
		cloneTag.Parent = char.Head
		cloneTag.TextLabel1.Text = plr.DisplayName
		cloneTag.TextLabel3.Text = "@"..plr.Name
end)
end)

Uhh idk I’m just grasping at straws now but try this… I tested the rthro head thing and it didn’t change anything…

If this doesn’t work, you can also try parenting the gui to the HumanoidRootPart instead of the head

For starters, connect playeradded to a function instead of branching it.
You also need to be checking for current players in the game and acting as if they already have a character loaded rather than waiting for a new character instance to be added.

local Players = game:GetService('Players')

function PlayerAdded(Player)
	local Character = Player.Character or Player.CharacterAdded:wait()
	repeat wait() until Character
	local Tag = Tag:Clone() --whatever ur tag is
	Tag.Parent = Character:WaitForChild('Head')
	Player.CharacterAdded:Connect(function(Character)
		local Tag = Tag:Clone() --whatever ur tag is
		Tag.Parent = Character:WaitForChild('Head')
	end)
end

for i,v in next, Players:GetPlayers() do
	PlayerAdded(v)
end

Players.PlayerAdded:Connect(PlayerAdded)

Not really sure why roblox does this, might be a bug. If your character has anything but the default head equipped, then the head gets removed and added back with the correct mesh. Same goes for any bodypart that has a non-default mesh equipped
image

To fix this you could add plr.CharacterAppearanceLoaded:Wait() on the 1st line of CharacterAdded

local nametag = game:GetService("ServerStorage").NameTagGui

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		plr.CharacterAppearanceLoaded:Wait()
		local cloneTag = nametag:Clone()
		cloneTag.Parent = char.Head
		cloneTag.TextLabel1.Text = plr.DisplayName
		cloneTag.TextLabel3.Text = "@"..plr.Name
	end)
end)
1 Like

Here’s 2 vids, 1 with a package, 1 without.


Fixed the bug, thanks for the response!