Hello all, I have a script which controls the player's hud, and in a certain section, there's a team indicator, and I want the textcolor of it to match the team color. Problem being, I'm met with an error which reads;
Player.PlayerGui.ClientEffects:53: bad argument #3 (Color3 expected, got BrickColor)
Here's a snippet of my code, if necessary. Will edit if more context is needed.
local Player = game.Players.LocalPlayer
local UI = script.Parent:WaitForChild("UI")
local roundInfo = UI:WaitForChild("RoundInfo")
local hp = UI:WaitForChild("Health")
game:GetService("RunService").RenderStepped:Connect(function()
if roundInfo.Team.Text ~= Player.Team.Name then
roundInfo.Team.Text = Player.Team.Name
roundInfo.Team.TextColor3 = Player.TeamColor-- <My problem
end
end)
Any and all help is greatly appreciated, thanks in advance!

1 comment
TeamColor.Color will return Color3 value of the BrickColor. https://developer.roblox.com/en-us/api-reference/datatype/BrickColor (sorry, there is no page about it :b )