Project 327: Exploder Course

10. Give players a warning before exploding

You probably noticed that there's no warning before bricks explode, which can make the game feel unfair. What if the bricks turned red right before they explode? After they're done exploding, they turn back to white. 

Starting point file for this challenge

Your goal

Steps

1. Instead of making ready = true at random times, set the brick color to red

You'll be setting the part's BrickColor to red. Now, there's a 1 in 6 chance your brick will turn red ... meaning danger! 

part.BrickColor = BrickColor.Red()

2. Instead of checking if ready is true, check if the brick is red before exploding

Now, whenever your brick randomly turns red, it also means it will be ready to explode! 

part.BrickColor == BrickColor.Red()

3. Set the brick color back to white after its done exploding

Instead of setting "ready" back to false, set the brick color back to white after exploding. 

part.BrickColor = BrickColor.White()