Hi, so here is my script with an if statement in it:
p1 = game.Workspace.p1
b = math.random(1, 2)
print(b)
if b == 1 then
color = "white"
end
if color == "white" and
p1.BrickColor == "White" then
p1.Transparency=0 else
p1.Transparency=1
if b == 2 then
color = "red"
end
if color == "red" and
p1.BrickColor == "Bright red" then
p1.Transparency=0 else
p1.Transparency=1
Even when b is "white" and p1's Brick color is "White," p1's transparency is 1. Same goes with red.
Anyone know why this isn't working properly?

1 comment
While I appreciate you taking the time to rewrite the script, I was actually trying to change the transparency of parts depending on their BrickColor and the random "b"