# How can I stop the jittering

**URL:** https://forum.makecode.com/t/how-can-i-stop-the-jittering/4528
**Category:** Help
**Created:** [November 20, 2020, 6:15pm UTC](https://forum.makecode.com/t/how-can-i-stop-the-jittering/4528 "2020-11-20T18:15:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [November 20, 2020, 6:15pm UTC](https://forum.makecode.com/t/how-can-i-stop-the-jittering/4528/1 "2020-11-20T18:15:38Z")

</div>

> **[War Subs](https://arcade.makecode.com/59101-63314-63705-18341)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Look here:

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

How can I stop the red submarine from jittering when it reaches the “Y” of the player’s submarine?

(Enter your name (just leave it blank) then press “A” when you reach the sub editor)

---

<div class="post-metadata">

### Author: ![SPerkins25](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@SPerkins25](https://forum.makecode.com/u/SPerkins25)
#### Post date: [November 20, 2020, 6:41pm UTC](https://forum.makecode.com/t/how-can-i-stop-the-jittering/4528/2 "2020-11-20T18:41:35Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/166d3e9de7bb999dcd8a940a2ce8182dd1a4db42.png)

Your if else doesn’t consider what should happen if the player’s y and enemy’s y match exactly.

Oh and your game looks awesome. Your pixel art is top notch.

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [November 20, 2020, 7:55pm UTC](https://forum.makecode.com/t/how-can-i-stop-the-jittering/4528/3 "2020-11-20T19:55:36Z")

</div>

> [@SPerkins25](#):
>
> Oh and your game looks awesome. Your pixel art is top notch.

Thanks!

I tried what you said before I posted this, and it didn’t work. Maybe I got it wrong? I’ll try again.

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [November 20, 2020, 8:38pm UTC](https://forum.makecode.com/t/how-can-i-stop-the-jittering/4528/4 "2020-11-20T20:38:50Z")

</div>

It doesn’t work, now it just bounces back and forth on a bigger line.

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [November 20, 2020, 8:41pm UTC](https://forum.makecode.com/t/how-can-i-stop-the-jittering/4528/5 "2020-11-20T20:41:09Z")

</div>

Wait, no! It does work! Just had to change something.
