Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can you set a team color (Switch Teams)?

I tried this code: player.TeamColor = BrickColor.new(game.Teams.Raiders.TeamColor)

And got this error:

00:11:46.198 - Workspace.Script:34: bad argument #1 to 'new' (Color3 expected, got BrickColor) 00:11:46.199 - Script 'Workspace.Script', Line 34 00:11:46.200 - Stack End

The team name is correct. I double checked.

1 answer

✓ Accepted answer

(Color3 expected, got BrickColor)

When using BrickColor.new(), the parameter is expected to be a Color3 Value. Since Raiders.TeamColor is already a BrickColor value, and not a Color 3 Value, it will not accept it. You can however, set a BrickColor value to a BrickColor value without using BrickColor.new():

player.TeamColor = game.Teams.Raiders.TeamColor;

1 comment

0

Thank You :)

This discussion is preserved as it was. New answers, comments, and votes are closed.