Nametag not cloning to players head

function onCharacterAdded(character)
	local gui = Instance.new("BillboardGui")
	local txt = Instance.new("TextLabel")
	txt.Text = 'it works just fine ¯\_(ツ)_/¯'
	txt.Size = UDim2.fromScale(1, 1)
	txt.BackgroundTransparency = 1
	txt.Parent = gui
	gui.Adornee = character.Head
	gui.AlwaysOnTop = true
	gui.Size = UDim2.fromScale(4, 4)
	gui.Parent = character.Head
end
function onPlayerAdded(player)
	if player.Character then
		onCharacterAdded(player.Character)
	end
	player.CharacterAdded:Connect(onCharacterAdded)
end

game:GetService("Players").PlayerAdded:Connect(onPlayerAdded)

Try disallowing the usage of other heads except for the default.

1 Like

if you parent it to the hrp it will always be at the center of that. You can use offset of attachments to move it above the player’s head

idk why but your script doesnt work to me

thank you for all the help yall gave me :))

Try this one:

function onCharacterAdded(character)
	local gui = Instance.new("BillboardGui")
	local txt = Instance.new("TextLabel")
	txt.Text = 'it works just fine ¯\_(ツ)_/¯'
	txt.Size = UDim2.fromScale(1, 1)
	txt.BackgroundTransparency = 1
	txt.Parent = gui
	gui.Adornee = character.HumanoidRootPart
	gui.AlwaysOnTop = true
	gui.Size = UDim2.fromScale(4, 4)
	gui.Parent = character
end
function onPlayerAdded(player)
	if player.Character then
		onCharacterAdded(player.Character)
	end
	player.CharacterAdded:Connect(onCharacterAdded)
end

game:GetService("Players").PlayerAdded:Connect(onPlayerAdded)

it uses HumanoidRootPart. It’s probably some avatar accessory that is causing the issue on your end.

2 Likes

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