# Jump repeating bug in my game

**URL:** <https://forum.makecode.com/t/jump-repeating-bug-in-my-game/30529>\
**Category:** Help\
**Created:** [September 11, 2024, 3:37am UTC](https://forum.makecode.com/t/jump-repeating-bug-in-my-game/30529 "2024-09-11T03:37:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChaoTheKing](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@ChaoTheKing](https://forum.makecode.com/u/ChaoTheKing)\
**Post date:** [September 11, 2024, 3:37am UTC](https://forum.makecode.com/t/jump-repeating-bug-in-my-game/30529/1 "2024-09-11T03:37:58Z")

</div>

I’m making a game for school, it is a platformer type of game and my character jumps with A. I’ve encountered a bug though where if I press the A button while my player character is mid jump, when he lands he’ll jump again. Does anyone know how to fix this?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/9/39266cd627796c5f578eff27d4b49079110f673d.png)

---

<div class="post-metadata">

**Author:** ![ADM\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adm_f/32/19808_2.png) [@ADM\_F](https://forum.makecode.com/u/ADM_F)\
**Post date:** [September 11, 2024, 2:37pm UTC](https://forum.makecode.com/t/jump-repeating-bug-in-my-game/30529/2 "2024-09-11T14:37:58Z")

</div>

instead of using On A pressed  
place your code into something like this  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/7/67ef2cffa43ea0da11090f6a4bceb2b51baab3b3.png)  
whats happening is when you press a while your jump code is running you make a “backlog” of inputs  
this SHOULD solve that

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [September 11, 2024, 2:38pm UTC](https://forum.makecode.com/t/jump-repeating-bug-in-my-game/30529/3 "2024-09-11T14:38:40Z")

</div>

It seems like the pause block could be delaying the button press until the player hits the ground and fulfills the pause requirements. I suggest using a “on player hits wall bottom” to reset the animation, but make sure to include an it statement confirming the player has a downward velocity or has the animation from jumping so it doesn’t activate every time the player walks.

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [September 11, 2024, 2:39pm UTC](https://forum.makecode.com/t/jump-repeating-bug-in-my-game/30529/4 "2024-09-11T14:39:21Z")

</div>

I think it is because of the pause until block.  
Perhaps recode in some way?

---

<div class="post-metadata">

**Author:** ![ChaoTheKing](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@ChaoTheKing](https://forum.makecode.com/u/ChaoTheKing)\
**Post date:** [September 12, 2024, 5:20am UTC](https://forum.makecode.com/t/jump-repeating-bug-in-my-game/30529/5 "2024-09-12T05:20:39Z")

</div>

Thanks for your help everyone, by removing the pause until block and extending the normal pause It doesn’t have that build up 😃
