Team overhead GUI i want to make an overhead GUI for each team it says for example if your blue it says Blue and ur name

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)

end)

You need to use player.Team.Name

	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

Alright, I can help with this!

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)

both work but how do i make it change every time you change teams

Do you have discord, I can help better there?

If so add me: kieranl29#3675

alright sure my discord is Drizzy#3800

This problem has been sorted with some script fixes.

Thanks.