# 𝐇𝐞𝐥𝐩 𝐰𝐢𝐭𝐡 𝐦𝐢𝐧𝐢 𝐦𝐞𝐧𝐮

**URL:** https://forum.makecode.com/t/topic/35595
**Category:** Help
**Tags:** extension, game
**Created:** [April 11, 2025, 11:56pm UTC](https://forum.makecode.com/t/topic/35595 "2025-04-11T23:56:17Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Oblivious](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/oblivious/32/30718_2.png) [@Oblivious](https://forum.makecode.com/u/Oblivious)
#### Post date: [April 11, 2025, 11:56pm UTC](https://forum.makecode.com/t/topic/35595/1 "2025-04-11T23:56:17Z")

</div>

𝐒𝐨 𝐈’𝐦 𝐮𝐬𝐢𝐧𝐠 𝐭𝐡𝐞 𝐚𝐫𝐜𝐚𝐝𝐞 𝐦𝐢𝐧𝐢 𝐦𝐞𝐧𝐮 𝐟𝐨𝐫 𝐦𝐲 𝐠𝐚𝐦𝐞, 𝐚𝐧𝐝 𝐰𝐡𝐞𝐧 𝐲𝐨𝐮 𝐬𝐭𝐚𝐫𝐭 𝐭𝐡𝐞 𝐠𝐚𝐦𝐞 𝐢𝐭 𝐠𝐢𝐯𝐞𝐬 𝐲𝐨𝐮 𝐚 𝐦𝐞𝐧𝐮 𝐰𝐢𝐭𝐡 𝐬𝐭𝐚𝐫𝐭 𝐠𝐚𝐦𝐞 𝐨𝐫 𝐜𝐫𝐞𝐝𝐢𝐭𝐬 𝐚𝐧𝐝 𝐬𝐭𝐮𝐟𝐟 (𝐦𝐲𝐌𝐞𝐧𝐮) , 𝐛𝐮𝐭 𝐰𝐡𝐞𝐧 𝐲𝐨𝐮 𝐜𝐡𝐨𝐨𝐬𝐞 𝐬𝐭𝐚𝐫𝐭, 𝐢𝐭 𝐨𝐩𝐞𝐧𝐬 𝐮𝐩 𝐚 𝐦𝐞𝐧𝐮 𝐟𝐨𝐫 𝐜𝐡𝐨𝐨𝐬𝐢𝐧𝐠 𝐚 𝐜𝐡𝐚𝐫𝐚𝐜𝐭𝐞𝐫. 𝐁𝐮𝐭 𝐞𝐯𝐞𝐧 𝐭𝐡𝐨𝐮𝐠𝐡 𝐈’𝐯𝐞 𝐭𝐫𝐢𝐞𝐝 𝐜𝐥𝐨𝐬𝐞 𝐦𝐲𝐌𝐞𝐧𝐮, 𝐝𝐞𝐬𝐭𝐫𝐨𝐲 𝐦𝐲𝐌𝐞𝐧𝐮, 𝐭𝐡𝐞 𝐨𝐫𝐢𝐠𝐢𝐧𝐚𝐥 𝐦𝐞𝐧𝐮 𝐬𝐭𝐚𝐲𝐬 𝐰𝐡𝐞𝐧 𝐬𝐞𝐥𝐞𝐜𝐭𝐞𝐝 𝐬𝐭𝐚𝐫𝐭, 𝐰𝐢𝐭𝐡 𝐭𝐡𝐞 𝐜𝐡𝐚𝐫𝐚𝐜𝐭𝐞𝐫 𝐨𝐧𝐞 𝐚𝐩𝐩𝐞𝐚𝐫𝐬 𝐨𝐧 𝐭𝐨𝐩 𝐨𝐟 𝐢𝐭.  
 ![1000000132](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/0/301ed5f74bf76cd5555b6afea6c900772d28b706.gif)  
𝐂𝐚𝐧 𝐬𝐨𝐦𝐞𝐨𝐧𝐞 𝐡𝐞𝐥𝐩?

---

<div class="post-metadata">

### Author: ![BotWarrior](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/botwarrior/32/25328_2.png) [@BotWarrior](https://forum.makecode.com/u/BotWarrior)
#### Post date: [April 13, 2025, 12:07am UTC](https://forum.makecode.com/t/topic/35595/2 "2025-04-13T00:07:56Z")

</div>

You are probably creating it multiple times. This is a common error with mini menu.

---

<div class="post-metadata">

### Author: ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)
#### Post date: [April 13, 2025, 12:10am UTC](https://forum.makecode.com/t/topic/35595/3 "2025-04-13T00:10:07Z")

</div>

Give us link to game, we can help debug that way.

---

<div class="post-metadata">

### Author: ![RobbyZero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robbyzero/32/17188_2.png) [@RobbyZero](https://forum.makecode.com/u/RobbyZero)
#### Post date: [April 13, 2025, 12:11am UTC](https://forum.makecode.com/t/topic/35595/4 "2025-04-13T00:11:23Z")

</div>

It’s hard to help without seeing the code. Do you have a share link to that project?

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [April 13, 2025, 12:21am UTC](https://forum.makecode.com/t/topic/35595/5 "2025-04-13T00:21:17Z")

</div>

Can you share your code? That will make the problem a lot easier to find. Without the code, there are a few possibilities I can think of:

1. You are using JavaScript, so not all variables are global, and you “set myMenu” inside a function or loop and the “myMenu” variable you are "close"ing is not the same as the inside-the-function-“myMenu” variable.

2. You are reusing the “myMenu” variable when you make the second menu or somewhere else, so now the “myMenu” variable points to something else, or points to the new menu, and does not point to the old menu. (Try moving the “destroy” block above the code you use to create the second menu) PS the “close” block is literally the exact same as the “destroy” block, so they should be doing the exact same thing and you can use either one.

3. You are accidentally spawning multiple of the first menu (maybe check the number of menu sprites existing? You can check the length of the “array of all sprites of kind miniMenu”)

4. For some reason your code isn’t running wherever you put those “destroy” and “close” blocks, so they are just never running. (try putting a “Splash(”“)” block under them to make sure the code is running them.)

---

<div class="post-metadata">

### Author: ![Oblivious](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/oblivious/32/30718_2.png) [@Oblivious](https://forum.makecode.com/u/Oblivious)
#### Post date: [April 13, 2025, 8:02pm UTC](https://forum.makecode.com/t/topic/35595/6 "2025-04-13T20:02:30Z")

</div>

> **[Crime is a Virue](https://arcade.makecode.com/S13869-07919-97026-37452)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 14, 2025, 6:13pm UTC](https://forum.makecode.com/t/topic/35595/7 "2025-04-14T18:13:42Z")

</div>

Most likely spawning many at once, as when trying to select a character, it loops back to the first, and can’t select it. Maybe try to have it spawn one instance.

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [April 15, 2025, 4:25am UTC](https://forum.makecode.com/t/topic/35595/8 "2025-04-15T04:25:38Z")

</div>

Looks like that “openStartMenu” variable isn’t preventing another start menu from being created in the correct spot. When you press A to select “start” on the menu, that “on A button Pressed” block runs first, making another menu before the openStartMenu variable has been set to 1. Instead, you should put it here:

 ![IMG_8336](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/7/37dfb25371f40449d948f422676714176ccbfc95.jpeg)  
So that the A button will never create the start menu ever again… or at least until you set it back to 0.

---

<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: [March 7, 2026, 7:42pm UTC](https://forum.makecode.com/t/topic/35595/9 "2026-03-07T19:42:42Z")

</div>

What is happening is that you press ‘A’ to select an item and then re-open the menu, which is triggered by the same button.
