Hello, I am trying to fix a script to get the team name from the team color.
local playerTeamColor = player.TeamColor
for i,v in pairs (game.Teams:GetChildren()) do
if v.TeamColor == BrickColor.new(Colour3.new(playerTeamColor)) then
local playerTeamName = v.Name
end
end
When this script runs, It returns the following:
14:19:23.553 - Players.Player1.PlayerGui.ScreenGui.Main.LocalScript:9: bad argument #1 to 'new' (Color3 expected, got userdata)
14:19:23.553 - Script 'Players.Player1.PlayerGui.ScreenGui.Main.LocalScript', Line 9 - global UpdateTeam
14:19:23.554 - Script 'Players.Player1.PlayerGui.ScreenGui.Main.LocalScript', Line 22
14:19:23.555 - Stack End
Please help and fix this,
Regards, devSparkle

1 comment
Thanks, I fixed it using "tostring"