# Stray Projectile

**URL:** <https://forum.makecode.com/t/stray-projectile/40406>\
**Category:** Help\
**Tags:** game\
**Created:** [November 12, 2025, 2:11pm UTC](https://forum.makecode.com/t/stray-projectile/40406 "2025-11-12T14:11:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![umbriel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/umbriel/32/26427_2.png) [@umbriel](https://forum.makecode.com/u/umbriel)\
**Post date:** [November 12, 2025, 2:11pm UTC](https://forum.makecode.com/t/stray-projectile/40406/1 "2025-11-12T14:11:50Z")

</div>

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](https://arcade.makecode.com/S65341-84415-19155-87204)

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [November 13, 2025, 2:21am UTC](https://forum.makecode.com/t/stray-projectile/40406/2 "2025-11-13T02:21:23Z")

</div>

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:

 ![IMG_0736](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/e/e/ee2a510a7ba9a64218961ee178ae46307eeba876.jpeg)

---

<div class="post-metadata">

**Author:** ![umbriel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/umbriel/32/26427_2.png) [@umbriel](https://forum.makecode.com/u/umbriel)\
**Post date:** [December 29, 2025, 9:40pm UTC](https://forum.makecode.com/t/stray-projectile/40406/3 "2025-12-29T21:40:00Z")

</div>

Thanks a lot! It worked very well! 🙂 (Sorry for the late reply btw)
