# Game update not working?

**URL:** <https://forum.makecode.com/t/game-update-not-working/16868>\
**Category:** Help\
**Created:** [December 12, 2022, 7:24pm UTC](https://forum.makecode.com/t/game-update-not-working/16868 "2022-12-12T19:24:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimRHS](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TimRHS](https://forum.makecode.com/u/TimRHS)\
**Post date:** [December 12, 2022, 7:24pm UTC](https://forum.makecode.com/t/game-update-not-working/16868/1 "2022-12-12T19:24:57Z")

</div>

Trying to help a student troubleshoot a problem. Before I start re-building their code from the start. Does any one know why any on Game Update may not be working? Thanks is advance!

> **[Trapdoor Zombie thing - Copy - Copy](https://arcade.makecode.com/S28998-91690-05547-24570)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [December 12, 2022, 7:36pm UTC](https://forum.makecode.com/t/game-update-not-working/16868/2 "2022-12-12T19:36:55Z")

</div>

Ah, this is sort of a subtle issue; it’s a little more obvious if you look at the code in JavaScript/TypeScript.

The problem here is that they are pausing inside of **on start**. Most events in MakeCode arcade (including **on game update** ) don’t register until **on start** has finished running.

We do it this way to make sure that any variables that are set inside of **on start** are initialized before the **on game update** event actually runs. Otherwise, any events that reference a sprite set in **on start** could potentially be accessing an undefined variable.

Easiest fix is to use an **on game update every 5000 ms** event to spawn the zombies instead

---

<div class="post-metadata">

**Author:** ![TimRHS](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TimRHS](https://forum.makecode.com/u/TimRHS)\
**Post date:** [December 12, 2022, 7:39pm UTC](https://forum.makecode.com/t/game-update-not-working/16868/3 "2022-12-12T19:39:58Z")

</div>

Thanks, Yes after I started to rebuild their code I came across the Repeat 1000 and pauses that were causing the issue.
