# Is there a way to put a player sprite above other sprites?

**URL:** https://forum.makecode.com/t/is-there-a-way-to-put-a-player-sprite-above-other-sprites/18873
**Category:** Help
**Created:** [March 30, 2023, 8:09pm UTC](https://forum.makecode.com/t/is-there-a-way-to-put-a-player-sprite-above-other-sprites/18873 "2023-03-30T20:09:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)
#### Post date: [March 30, 2023, 8:09pm UTC](https://forum.makecode.com/t/is-there-a-way-to-put-a-player-sprite-above-other-sprites/18873/1 "2023-03-30T20:09:45Z")

</div>

I’m trying to make a menu and want to have the cursor over the button. The cursor goes underneath the button. Is there a way to fix it?

Could it be that the button is set after the cursor?

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [March 30, 2023, 8:44pm UTC](https://forum.makecode.com/t/is-there-a-way-to-put-a-player-sprite-above-other-sprites/18873/2 "2023-03-30T20:44:18Z")

</div>

The sprites created first in the on start block are at the bottom, newer ones at the top! put it after creating the menu!

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [March 30, 2023, 8:46pm UTC](https://forum.makecode.com/t/is-there-a-way-to-put-a-player-sprite-above-other-sprites/18873/3 "2023-03-30T20:46:56Z")

</div>

The z index of a sprite is used to determine the order in which they are drawn - so if you want to show one sprite above others, just give it a positive z index (sprites are typically created at z == 0, and so as @randomuser mentioned it will then render in the order they are created).

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

Here’s the documentation page for reference: [https://arcade.makecode.com/reference/sprites/sprite/z](https://arcade.makecode.com/reference/sprites/sprite/z)

---

<div class="post-metadata">

### Author: ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)
#### Post date: [March 31, 2023, 4:49pm UTC](https://forum.makecode.com/t/is-there-a-way-to-put-a-player-sprite-above-other-sprites/18873/4 "2023-03-31T16:49:39Z")

</div>

Thanks!
