# Mario Enemy bug

**URL:** <https://forum.makecode.com/t/mario-enemy-bug/44333>\
**Category:** Help\
**Created:** [June 4, 2026, 12:22am UTC](https://forum.makecode.com/t/mario-enemy-bug/44333 "2026-06-04T00:22:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KatTheSequel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/katthesequel/32/29035_2.png) [@KatTheSequel](https://forum.makecode.com/u/KatTheSequel)\
**Post date:** [June 4, 2026, 12:22am UTC](https://forum.makecode.com/t/mario-enemy-bug/44333/1 "2026-06-04T00:22:51Z")

</div>

I place two Rex’s and one of them breaks. How do I fix it?

> **[Super Mario World MakeCode Proof of Concept](https://arcade.makecode.com/S29217-83347-49251-62713)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![codeFan413](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codefan413/32/26855_2.png) [@codeFan413](https://forum.makecode.com/u/codeFan413)\
**Post date:** [June 5, 2026, 1:53am UTC](https://forum.makecode.com/t/mario-enemy-bug/44333/2 "2026-06-05T01:53:04Z")

</div>

The way you programmed animations following their hitboxes, only the last assigned animation to the variable can follow the last assigned enemy hitbox.

You can actually do this by using either the [github.com/riknoll/arcade-improved-sprite-data](http://github.com/riknoll/arcade-improved-sprite-data) extension or pararell arrays, but i recommend using riknoll’s extension for assigning sprites to another, here is an example of how you can do this:

> **[test](https://arcade.makecode.com/30065-57394-16092-71848)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.
