I’m getting a brickcolor from a string and then using that to set it to the team color, but my issue is it gets the right color and then as soon as I set it to a brick color it changes from “Really red” to “Really black”
- I get Really red from a string in the group description
- I combine the strings Really and red
- It returns Really black?
why does this get the color right at first (really red) and then turn it into really black when i convert it to an actual brickcolor?
local bcolor1 = group.Description:match("Color: (%a+)")
local bcolor2, bcolor3 = group.Description:match("Color: (%a+) (%a+)")
local Team = Instance.new("Team")
Team.Name = group.Name
-- prints really red
print(bcolor2)
print(bcolor3)
if bcolor1 ~= nil then
if bcolor3 ~= nil then
-- prints really black?
print(tostring(BrickColor.new(bcolor2, bcolor3)))
Team.TeamColor = BrickColor.new(bcolor2, bcolor3)
else
Team.TeamColor = BrickColor.new(bcolor1)
end
else
Team.TeamColor = BrickColor.random()
end