Stray Projectile

Hi. I’m currently working on a game where the player will have to dodge projectiles. However, when the player is hit and the game ends, there is always a stray projectile that will fly in at the top of the screen. Anyone knows why it happens and how to stop it? Here’s the game link https://arcade.makecode.com/S65341-84415-19155-87204

1 Like

The forever block doesn’t stop running after the game is over, it only stops restarting, so since you have that pause block at the top, once that pause is over the forever block completes it’s code, even after the game is done. Then it doesn’t restart again.

The simple solution is to put the wait after the code in the forever block. Since the forever block doesn’t start until the code in On Start completes, you can put a “wait” at the end of the On Start block so that it waits the correct amount of time: