How to create overhead name gui

Hello! I’m back, today I will show you how to create an overhead gui which shows the player’s name; you will learn how to create 2 different types of it.

image

  1. Create a BillboardGui with a TextLabel, like this: image
  2. Put the BillboardGui in ReplicatedStorage;
  3. Insert a Script in ServerScriptService;
Name only

Write this into the script:

game.Players.PlayerAdded:Connect(function(player) --here we create a player variable when someone joins the game
    player.CharacterAdded:Connect(function(character) --here we create a character's variable of the joined player
        local gui = game.ReplicatedStorage:WaitForChild("NameGui"):Clone() --here we clone the BillboardGui, NOTE: change "NameGui" with the name of your BillboardGui
        gui.Parent = character.Head --here we put the cloned gui in the player's head
        gui.Adornee = character.Head --here we change the adornee of the gui to the player's head
        gui.PlayerName.Text = player.Name --here change the text with the player's name, NOTE: change "PlayerName" with the name of your TextLabel
    end)
end)
Team color name

Write this inside the script:

game.Players.PlayerAdded:Connect(function(player) --here we create a player variable when someone joins the game
    player.CharacterAdded:Connect(function(character) --here we create a character's variable of the joined player
        local gui = game.ReplicatedStorage:WaitForChild("NameGui"):Clone() --here we clone the BillboardGui, NOTE: change "NameGui" with the name of your BillboardGui
        gui.Parent = character.Head --here we put the cloned gui in the player's head
        gui.Adornee = character.Head --here we change the adornee of the gui to the player's head
        gui.PlayerName.Text = player.Name --here change the text with the player's name, NOTE: change "PlayerName" with the name of your TextLabel
        gui.PlayerName.TextColor = player.Team.TeamColor --here we set the text color to the color of the team of the player, NOTE: change "PlayerName" with the name of your TextLabel
    end)
end)

This is all for today, have a nice day!

7 Likes

you would also have to teach on how to make a billboard gui and how to scale it etc…

1 Like

Use this if u need extra help:
Guide to create overhead gui

this is very helpful, thank you :slight_smile:

1 Like