# Animation of sprite not working as intended

**URL:** <https://forum.makecode.com/t/animation-of-sprite-not-working-as-intended/32360>\
**Category:** Help\
**Tags:** game, art\
**Created:** [December 10, 2024, 2:09am UTC](https://forum.makecode.com/t/animation-of-sprite-not-working-as-intended/32360 "2024-12-10T02:09:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Holderify](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@Holderify](https://forum.makecode.com/u/Holderify)\
**Post date:** [December 10, 2024, 2:09am UTC](https://forum.makecode.com/t/animation-of-sprite-not-working-as-intended/32360/1 "2024-12-10T02:09:53Z")

</div>

[The animation of my character keeps having ‘jitters’ in it and is not playing it’s idle animation after I press a button. If you are able to help that would be wonderful. Thank you.](https://arcade.makecode.com/S16920-59983-66720-33026)

---

<div class="post-metadata">

**Author:** ![Don](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/don/32/17989_2.png) [@Don](https://forum.makecode.com/u/Don)\
**Post date:** [December 10, 2024, 5:40pm UTC](https://forum.makecode.com/t/animation-of-sprite-not-working-as-intended/32360/2 "2024-12-10T17:40:37Z")

</div>

You are working too hard. Let the extension do the work.  
This is all you need:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/5/6586f10ace10fbb7db67141f5aa9a94512ea2972.png)

---

<div class="post-metadata">

**Author:** ![Holderify](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@Holderify](https://forum.makecode.com/u/Holderify)\
**Post date:** [December 10, 2024, 5:47pm UTC](https://forum.makecode.com/t/animation-of-sprite-not-working-as-intended/32360/3 "2024-12-10T17:47:15Z")

</div>

does it already recognize what moving up, down, right, left, ect. is? Thank you.

---

<div class="post-metadata">

**Author:** ![Sonicblaston](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sonicblaston/32/19164_2.png) [@Sonicblaston](https://forum.makecode.com/u/Sonicblaston)\
**Post date:** [December 10, 2024, 5:48pm UTC](https://forum.makecode.com/t/animation-of-sprite-not-working-as-intended/32360/4 "2024-12-10T17:48:18Z")

</div>

Here I fixed it for you. The problem was something I got solved yesterday. Your sprite size was an odd number. For some reason, Makecode doesn’t like that. That is why it looked so jittery. I also noticed that you were specifying the direction on every button press. You don’t actually need to do that. it does that automatically. Here is your code fixed. everything works just like the old but with fewer blocks.

> **[WIP Fix](https://arcade.makecode.com/S20500-62526-68324-78320)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Holderify](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@Holderify](https://forum.makecode.com/u/Holderify)\
**Post date:** [December 10, 2024, 5:53pm UTC](https://forum.makecode.com/t/animation-of-sprite-not-working-as-intended/32360/5 "2024-12-10T17:53:06Z")

</div>

Thank you!
