Okay, I have a piece of code that does this:

script.Parent.Team.Changed:Wait()

if script.Parent.Parent.Name ~= "NoobContainer" then
	script.Parent:destroy()
end

if script.Parent.Team.Value == BrickColor.Red() then
	script.Parent.Torso.BrickColor = BrickColor.Red()
	script.Parent["Body Colors"].TorsoColor = BrickColor.Red()
	
	script.Parent["Left Leg"].BrickColor = BrickColor.Black()
	script.Parent["Body Colors"].LeftLegColor = BrickColor.Black()
	
	script.Parent["Right Leg"].BrickColor = BrickColor.Black()
	script.Parent["Body Colors"].RightLegColor = BrickColor.Black()
elseif script.Parent.Team.Value == BrickColor.Blue() then
	script.Parent.Torso.BrickColor = BrickColor.Blue()
	script.Parent["Body Colors"].TorsoColor = BrickColor.Blue()
else
	script.Parent:destroy()
end

There's a spawner that clones and changes their Team to BrickColor.Red() and BrickColor.Blue(). However, The above case doesn't even fire when it's red, it doesn't even flow down to destroying the model... I don't think it's a syntax error, but I'm stuck. Any help?

5 comments

0

There's no guarantee that their brick color will be the exact brick color that BrickColor.Red() returns. If you don't assign it to the color it returns it won't execute.

0

BrickColor.Red() is bright red, which I've set it to...unless BrickColor.Red() ~= BrickColor.Red().. or i'm missing soething

0

BrickColor.new("Red")

0

that forces Roblox to use Red and not Bright Red

0

oh, i didn't know you could use strings inside brickcolor.new...tx