# Turn Multiple Sprites to a Different Image

**URL:** <https://forum.makecode.com/t/turn-multiple-sprites-to-a-different-image/19123>\
**Category:** Help\
**Tags:** game\
**Created:** [April 11, 2023, 8:47pm UTC](https://forum.makecode.com/t/turn-multiple-sprites-to-a-different-image/19123 "2023-04-11T20:47:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GoMustangs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gomustangs/32/4323_2.png) [@GoMustangs](https://forum.makecode.com/u/GoMustangs)\
**Post date:** [April 11, 2023, 8:47pm UTC](https://forum.makecode.com/t/turn-multiple-sprites-to-a-different-image/19123/1 "2023-04-11T20:47:05Z")

</div>

> **[illusionGame](https://arcade.makecode.com/20456-39284-94700-63850)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I’m trying to make code that will turn multiple sprites into a different image when the A button is pressed, and return them to the their old image if the A button is released. It’s only turning 1 sprite into the correct image and returning it back to it’s old form when the A button is released.

Does anyone know how to fix this?

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

---

<div class="post-metadata">

**Author:** ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)\
**Post date:** [April 11, 2023, 9:03pm UTC](https://forum.makecode.com/t/turn-multiple-sprites-to-a-different-image/19123/2 "2023-04-11T21:03:36Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/df6ba0d44e9c0f35b4229768944c595f20535134.png)  
This code should work! It should make every sprite of that kind change its image.
