# How do I stop all sprites from moving?

**URL:** <https://forum.makecode.com/t/how-do-i-stop-all-sprites-from-moving/22000>\
**Category:** Help\
**Created:** [August 22, 2023, 4:24pm UTC](https://forum.makecode.com/t/how-do-i-stop-all-sprites-from-moving/22000 "2023-08-22T16:24:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![IMakeCode](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/imakecode/32/17303_2.png) [@IMakeCode](https://forum.makecode.com/u/IMakeCode)\
**Post date:** [August 22, 2023, 4:24pm UTC](https://forum.makecode.com/t/how-do-i-stop-all-sprites-from-moving/22000/1 "2023-08-22T16:24:09Z")

</div>

I was wondering how I would be able to stop everything on screen to stop moving, like how it does in the pause menu.

---

<div class="post-metadata">

**Author:** ![jnegative](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jnegative/32/10173_2.png) [@jnegative](https://forum.makecode.com/u/jnegative)\
**Post date:** [August 22, 2023, 4:35pm UTC](https://forum.makecode.com/t/how-do-i-stop-all-sprites-from-moving/22000/2 "2023-08-22T16:35:36Z")

</div>

As far as I know, there isn’t a block for that, you’d have to have a game\_running variable that is checked in all game updates, overlaps, button presses, etc. in addition to setting any move with buttons to 0, 0. Also loop through all of the sprites and set their velocity and acceleration to 0.  
I hope this helps!

---

<div class="post-metadata">

**Author:** ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)\
**Post date:** [August 23, 2023, 6:02pm UTC](https://forum.makecode.com/t/how-do-i-stop-all-sprites-from-moving/22000/3 "2023-08-23T18:02:42Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/eb322f932fd236c672f6e9973953b804444dd32e.png)  
This should work.

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [August 24, 2023, 6:32am UTC](https://forum.makecode.com/t/how-do-i-stop-all-sprites-from-moving/22000/4 "2023-08-24T06:32:10Z")

</div>

If you change it to forever, and add an if true you can toggle “pause”

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [August 24, 2023, 6:34am UTC](https://forum.makecode.com/t/how-do-i-stop-all-sprites-from-moving/22000/5 "2023-08-24T06:34:28Z")

</div>

Also add a `set <sprite> acceleration to ax 0 ay 0` block just to make sure, since some sprites could be accelerating, and setting their velocity to 0 wouldn’t stop them. But yeah, I think this does it
