local char = player.Character
local head = char:FindFirstChild("Head")
local bgui = Instance.new("BillboardGui")
bgui.Parent = head
bgui.Size = UDim2.new(1,0,1,0)
bgui.Adornee = head
bgui.StudsOffset = Vector3.new(0,2,0)
bgui.AlwaysOnTop = true
local frame = Instance.new("Frame")
frame.Parent = bgui
frame.BackgroundTransparency = 0.4
if player.Team == "Yellow" then -- Yellow is the team name not team color
frame.BackgroundColor3 = BrickColor.new("Buttermilk").Color
elseif player.Team == "Green" then -- Green is team name not team color
frame.BackgroundColor3 = BrickColor.new("Mint").Color
end
The billboard gui is in the player's head, but not showing up. Also, the "BackgroundColor3" property doesn't change. There's no error in the output, and this is only a portion of the script. Could somebody help?

2 comments
is there another part to the script? there doesn't seem to be a variable referencing "player" on line 1.
Yes, as I said in the op, this is only a portion of the script