Hi, I'm very new to this, and I'm having a hard time understanding why my code isn't working.
score = 500 if score > 100 then Script.Parent.BrickColor = BrickColor.new("Really red") else script.Parent.BrickColor = BrickColor.new("Really blue") end
If the variable 'score' is less than 100 the brick changes to the color 'Really blue' as expected. It's only when I make 'score' above 100, (like in the above example), where the brick color remains unchanged? Why is this?
You capitalized the "script" in line 4, it should look like this
score = 500 if score > 100 then script.Parent.BrickColor = BrickColor.new("Really red") else script.Parent.BrickColor = BrickColor.new("Really blue") end