Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I change teams?

Asked by 8 years ago

Recreating an ancient game, need some assistance with the following script.

local tcName = "Really blue" --TeamColor name
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Down:connect(function()
    player.TeamColor = tcName
end)

Trying to get it so that the tcName variable would set the players TeamColor to the following string (The TeamColor), but the output says that the Teamcolor value is invalid when trying.

1 answer

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
8 years ago

TeamColor is a BrickColor, so set it to BrickColor.new(tcname).

Ad

Answer this question