# How to make proper UI sprite

**URL:** https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638
**Category:** Help
**Tags:** game
**Created:** [April 26, 2026, 1:28am UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638 "2026-04-26T01:28:16Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Mikey\_s.3000](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mikey_s.3000/32/24839_2.png) [@Mikey\_s.3000](https://forum.makecode.com/u/Mikey_s.3000)
#### Post date: [April 26, 2026, 1:28am UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/1 "2026-04-26T01:28:17Z")

</div>

Can someone help me try to make a proper sprite for the UI screen of my project and the UI icons being able to stay on the screen whenever moving, like this pink block and next to it and A button icon showing to press A to shoot a projectile

> **[hi](https://arcade.makecode.com/41848-59547-68476-18517)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

 ![IMG9613](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/7/4/74d851bcf3198ed5678df9050e11819720860092.jpeg)

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [April 26, 2026, 6:02pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/2 "2026-04-26T18:02:21Z")

</div>

You can use the set sprite flag block. Usiong that you can set your UI sprite to relative to camera and done! IT stays on the screen no matter where the camera moves

---

<div class="post-metadata">

### Author: ![BitBot](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bitbot/32/33272_2.png) [@BitBot](https://forum.makecode.com/u/BitBot)
#### Post date: [April 26, 2026, 6:04pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/3 "2026-04-26T18:04:36Z")

</div>

Take this block out of the toolbox:

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

Then change the “auto destroy” to relative to camera like so:

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

Then toggle OFF to ON, then you’re set!

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

---

<div class="post-metadata">

### Author: ![OrigamiArtist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/origamiartist/32/33299_2.png) [@OrigamiArtist](https://forum.makecode.com/u/OrigamiArtist)
#### Post date: [April 26, 2026, 6:26pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/4 "2026-04-26T18:26:02Z")

</div>

A ‘sprite stay in screen’ block might work. I prefer to use ‘`Set mySprite Relative to camera to on`’ block. These can be found in the Sprites category.

---

<div class="post-metadata">

### Author: ![RizeUpDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rizeupdev/32/35291_2.png) [@RizeUpDev](https://forum.makecode.com/u/RizeUpDev)
#### Post date: [April 26, 2026, 6:34pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/5 "2026-04-26T18:34:24Z")

</div>

There are 2 ways to do it.

1. You could use the ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/2/623f601724f7d6e2a99f7b6fd8dcfe3545acafd4.png) block. Press on the drop-down menu and click on ‘relative to camera’ block. This is useful for small, repetitive projects.

2. You could install the arcade sprite utils extension searching this:

I hope this was helpful. If you have any questions don’t hesitate to ask!

---

<div class="post-metadata">

### Author: ![NeverStopTheCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neverstopthecoder/32/21194_2.png) [@NeverStopTheCoder](https://forum.makecode.com/u/NeverStopTheCoder)
#### Post date: [April 26, 2026, 6:35pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/6 "2026-04-26T18:35:56Z")

</div>

you can use

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

which makes it so the sptite will always stay on screen where there are and move with the camera

downside is it auto make ghost set to on so you can overlap with anything

---

<div class="post-metadata">

### Author: ![Mikey\_s.3000](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mikey_s.3000/32/24839_2.png) [@Mikey\_s.3000](https://forum.makecode.com/u/Mikey_s.3000)
#### Post date: [April 27, 2026, 4:41pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/7 "2026-04-27T16:41:44Z")

</div>

How can I also make the UI sprite stay on top of the other sprites cuz it looks like this now

 ![IMG9616](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/9/c/9c46cd5efa056a98cd45fb1b56a04ca3ee0f4178.jpeg)

---

<div class="post-metadata">

### Author: ![RizeUpDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rizeupdev/32/35291_2.png) [@RizeUpDev](https://forum.makecode.com/u/RizeUpDev)
#### Post date: [April 27, 2026, 5:22pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/8 "2026-04-27T17:22:26Z")

</div>

You should make sure to add this sprite AFTER the tree sprite is added!

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [April 27, 2026, 10:16pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/9 "2026-04-27T22:16:16Z")

</div>

You can drag a set (sprite) x to (0) block and then change the x into z, which is at the very bottom. This allows you to order which sprites are on top another, with higher numbers being closer to the screen and lower being further. Or I guess you could just use riseupdevs way…

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [April 27, 2026, 10:17pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/10 "2026-04-27T22:17:11Z")

</div>

set the z index of the ui sprite to be higher than the objects underneath it. higher-z sprites will always be drawn above lower-z sprites

---

<div class="post-metadata">

### Author: ![Mikey\_s.3000](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mikey_s.3000/32/24839_2.png) [@Mikey\_s.3000](https://forum.makecode.com/u/Mikey_s.3000)
#### Post date: [April 28, 2026, 6:30pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/11 "2026-04-28T18:30:01Z")

</div>

What block is it?

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [April 28, 2026, 8:31pm UTC](https://forum.makecode.com/t/how-to-make-proper-ui-sprite/43638/12 "2026-04-28T20:31:22Z")

</div>

it’s in the property dropdown. same one as x, y, vx, vy, etc
