--// variables //--
local gui = game:GetService("ServerStorage"):WaitForChild("Name")
--// script //--
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if not char.Head:FindFirstChild("Name") then
local clone = gui:Clone()
clone.Thing.plr.Text = plr.Name
local color = plr.TeamColor.Color
clone.Thing.plr.TextColor3 = color
clone.Thing.rank.Text = plr:GetRoleInGroup(3135949)
clone.Parent = game.Workspace:WaitForChild(plr.Name).Head
end
--// second part //--
plr.Team.Changed:Connect(function()
local color = plr.TeamColor.Color
char:WaitForChild("Head").Name.Thing.plr.TextColor3 = color
end)
end)
end)
The second part isn't working, I don't know why.

1 comment
Here's some other information: When I respawn, it will definitely change the color. However, I need it so that when the player changes the team, it IMMEDIATELY changes it's color.