# Can you delete code while the game is playing?

**URL:** <https://forum.makecode.com/t/can-you-delete-code-while-the-game-is-playing/40688>\
**Category:** Help\
**Created:** [November 28, 2025, 3:07am UTC](https://forum.makecode.com/t/can-you-delete-code-while-the-game-is-playing/40688 "2025-11-28T03:07:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dlee](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@Dlee](https://forum.makecode.com/u/Dlee)\
**Post date:** [November 28, 2025, 3:07am UTC](https://forum.makecode.com/t/can-you-delete-code-while-the-game-is-playing/40688/1 "2025-11-28T03:07:42Z")

</div>

I trying to find a way to open the menu after I close it.

> **[Gui experemnt](https://arcade.makecode.com/86051-22938-35027-52622)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<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:** [November 28, 2025, 4:02am UTC](https://forum.makecode.com/t/can-you-delete-code-while-the-game-is-playing/40688/2 "2025-11-28T04:02:34Z")

</div>

Why not just… create it again? I believe technically the data is still there after the menu is destroyed, so yes theoretically (using javaScript instead of blocks) you could just kinda pop the menu back into existence, but I don’t think you need to do all that. and you would need javaScript to do that anyways. If you just create a new menu with the same variable and code, it will have all the same properties. You could even put all the menu creation code into a function so that you don’t have to make it all more than one time:

 ![Screenshot 2025-11-27 at 10.35.13 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/4/34e1a6b8a786932ff0e15e712c949da0dcbf2710.png)  
Is this what you’re trying to do?

---

<div class="post-metadata">

**Author:** ![Dlee](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@Dlee](https://forum.makecode.com/u/Dlee)\
**Post date:** [December 2, 2025, 2:31pm UTC](https://forum.makecode.com/t/can-you-delete-code-while-the-game-is-playing/40688/3 "2025-12-02T14:31:21Z")

</div>

Yes, it is! Thank you very much, woof woof, you have helped a lot.
