if workspace.C.REDD.RED.BrickColor==BrickColor.new("Really red") or workspace.C.REDD.RED.BrickColor==BrickColor.new("Bright red")or workspace.C.REDD.RED.BrickColor==BrickColor.new("Persimmon") and workspace.C.BLUEE.BLUE.BrickColor==BrickColor.new("Really blue") or workspace.C.BLUEE.BLUE.BrickColor==BrickColor.new("Bright blue")or workspace.C.BLUEE.BLUE.BrickColor==BrickColor.new("Electric blue") and workspace.C.WHITEE.WHITE.BrickColor==BrickColor.new("Ghost grey") then Message=Instance.new("Message",workspace) Message.Text="YOU WIN!" wait(3) Message:Remove() end
C is the main parent, REDD is the child of C but the parent of RED. When I change the colors to what it's supposed to be the message that is supposed to appear does not show up.
The issue with your script is that you are trying to put everything on a single if statement. You tell it to check for three brickcolors, then you use and to check for the other colors. When you use the and, it only affects that specific statement after the and. The or that comes after is not connected to the and, making it a entirely different statement that can pass all the other ones. To fix it I would make if statements that check for each brick separately
PartOneCorrect = false PartTwoCorrect = false PartThreeCorrect = false if PartPath.BrickColor == BrickColor.new("Really red") or PartPath.BrickColor == BrickColor.new("Bright red") or PartPath.BrickColor == BrickColor.new("Persimmon") then PartOneCorrect = true end if PartPath.BrickColor == BrickColor.new("Really blue") or PartPath.BrickColor == BrickColor.new("Bright blue") or PartPath.BrickColor == BrickColor.new("Electric blue") then PartTwoCorrect = true end if PartPath.BrickColor == BrickColor.new("Ghost grey") then PartThreeCorrect = true end if PartOneCorrect == true and PartTwoCorrect == true and PartThreeCorrect == true then --Run what code you want to run here end