local rep = game:GetService(“ReplicatedStorage”)
local nametag = rep.NameTag
local Teams = game:GetService(“Teams”)
local Blue = Teams:FindFirstChild(“Blue”)
–Functions
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local head = char.Head
local newtext = nametag:Clone()
local uppertext = newtext.UpperText
local lowertext = newtext.LowerText
local humanoid = char.Humanoid
humanoid.DisplayDistanceType = "None"
newtext.Parent = head
newtext.Adornee = head
uppertext.Text = player.Team
if player.Team == "Blue" then
lowertext.Text = "Blue" --This is that the text will say.
lowertext.TextColor3 = Color3.fromRGB(255, 51, 0) --This is what the color of the text will be.
end
end)
if player.Team.Name == "Blue" then
lowertext.Text = "Blue" --This is that the text will say.
lowertext.TextColor3 = Color3.fromRGB(255, 51, 0) --This is what the color of the text will be.
end
local team = uppertext.Text
team.Text = "[" .. "CHOOSING" .. "]"
Add this for the team part then the if should work just replace it with
if team.Text == "Blue" then
lowertext.Text = "Blue" --This is that the text will say.
lowertext.TextColor3 = Color3.fromRGB(255, 51, 0) --This is what the color of the text will be.
```
local newtext = nametag:Clone()
local uppertext = newtext.UpperText
local lowertext = newtext.LowerText
local humanoid = char.Humanoid
humanoid.DisplayDistanceType = "None"
newtext.Parent = head
newtext.Adornee = head
local team = uppertext.Text
team.Text = "[" .. "CHOOSING" .. "]"
if team.Text == "Blue" then
lowertext.Text = "Blue" --This is that the text will say.
lowertext.TextColor3 = Color3.fromRGB(255, 51, 0) --This is what the color of the text will be.
end
end)
end)