How to give player a nametag above head

I’m trying to give certain players a special nametag above their head? How would I do this? I don’t really know where to start.

2 Likes

billboardgui

4 Likes

You mean like edit the one they already have, or create a custom one?

If you want a custom one, you’ll insert a BillboardGui into their head, like @DeodorantSlice37 already mentioned. Make sure to change their default name’s DisplayDistance to 0 in their Humanoid to hide it.

If you just want to edit their name tag that already exists, you should modify the DisplayName property of their Character.Humanoid.

4 Likes

First, you create a BillboardGui and name it “Nametag.” Set the size to 4,0, 1,0. Set the StudsOffset property to 0, 3.5, 0. Put a TextLabel inside it. Change the Text to “Name.” Put the nametag in ReplicatedStorage. Next, create a server script and write this code:

local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local Players = game:GetService(“Players”)
local Nametag = ReplicatedStorage.Nametag

Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
repeat wait() until Character:FindFirstChild(“Head”)
local newNametag = Nametag:Clone()
newNametag.Parent = Character.Head
newNametag.Adornee = Character.Head
newNametag.TextLabel.Text = Player.Name
end)
end)

I hope this works. It did for me!

3 Likes

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