How to make Name tags and Team Tages

What I want but instead of Prodigy It show the team you are one

This script give you the the user name but I don’t know how to add the team on to it. How do I do this

This is a normal Script in StarterCharaterScripts and the head UI is is serverstorage

local char = script.Parent

local NameTagClone = game.ServerStorage.HeadUI:Clone()

NameTagClone.Parent = char.Head
NameTagClone.Adornee = char.Head

NameTagClone.UI.NameUI.Name = char.Name

char.Humanoid.DisplayDistanceType = "None"
4 Likes

You could do something like this:

NameTagClone.UI.NameUI[“nameOfTeamTag”].Text = player.Team.Name

Just a short little snippet. Nothing much more ima say.

There is a property of a player called “Team”. Use it like this:

TextLabel.Text = plr.Team.Name

This come up Team is not a valid member of Model “Workspace.Cyber_Designer” - Server

Workspace.Cyber_Designer is your character. Your player however, is inside the “Players” service.
image

image
“melvinpetersen” should show up as your own name, but the most important part is that’s your player.

where is teams located in the player

You could get the player by using:

local plr = game.Players:GetPlayerFromCharacter(char)

Select the player and scroll all the way down until you see this:
image
You can then head onto the script and do
plr.Team.Name
which gets the name of the team aka a string value.

Its not working

local char = script.Parent
local plr = game.Players:GetPlayerFromCharacter(char)

local NameTagClone = game.ServerStorage.HeadUI:Clone()

NameTagClone.Parent = char.Head
NameTagClone.Adornee = char.Head
NameTagClone.UI.RankUI.Name.Text = char.Team.Name

NameTagClone.UI.NameUI.Name = char.Name

char.Humanoid.DisplayDistanceType = "None"

Change “char” to “plr” and that should fix the problem.

It said Workspace.Cyber_Designer.HeadUI:8: attempt to index nil with ‘Name’

Send me the “HeadUI” and all of it’s children. It can be located in the explorer tab.

HeadUI.rbxm (6.7 KB)

The UI got in ServerStorage
The Script goes in StarterCharacterScripts

Does it look somewhat like this?
image

some what----------------------
Screenshot 2023-08-15 at 13.36.01

Could you send me the current script?

it said Team is not a valid member of Model “Workspace.Cyber_Designer” - Server -

Could you send me the current script?

The UI got in ServerStorage
The Script goes in StarterCharacterScripts
HeadUI.rbxm (6.7 KB)