How do you get a player’s teamcolor?

What I’m making: a gui frame that is the same color as the player’s teamcolor

What I tried: Team.BrickColor

it was either the first part or the second part that went wrong

The script is like:
Script.Parent.BackGroundColor3 = Player.Team.BrickColor

1 Like

https://developer.roblox.com/en-us/api-reference/property/Player/TeamColor

local Players = game:GetService("Players")
local Player = Players.LocalPlayer

script.Parent.BackgroundColor3 = Player.TeamColor.Color
3 Likes

There is a property for that:

player.TeamColor

https://developer.roblox.com/en-us/api-reference/property/Player/TeamColor

1 Like

I thought you had to do Player.Team.TeamColor