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"
7 Likes
Doomcolp
(dxxmed)
August 15, 2023, 5:11pm
#2
You could do something like this:
NameTagClone.UI.NameUI[“nameOfTeamTag”].Text = player.Team.Name
Just a short little snippet. Nothing much more ima say.
1 Like
There is a property of a player called “Team”. Use it like this:
TextLabel.Text = plr.Team.Name
1 Like
This come up Team is not a valid member of Model “Workspace.Cyber_Designer” - Server
1 Like
Workspace.Cyber_Designer is your character. Your player however, is inside the “Players” service.
1 Like
“melvinpetersen” should show up as your own name, but the most important part is that’s your player.
1 Like
where is teams located in the player
1 Like
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:
You can then head onto the script and do
plr.Team.Name
which gets the name of the team aka a string value.
1 Like
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"
1 Like
ATLX:
char.Team.Name
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.
1 Like
HeadUI.rbxm (6.7 KB)
The UI got in ServerStorage
The Script goes in StarterCharacterScripts
1 Like
Does it look somewhat like this?
1 Like
some what----------------------
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)