# Can someone help me idk how to code properly

**URL:** <https://forum.makecode.com/t/can-someone-help-me-idk-how-to-code-properly/47374>\
**Category:** Arcade\
**Created:** [November 16, 2026, 7:07pm UTC](https://forum.makecode.com/t/can-someone-help-me-idk-how-to-code-properly/47374 "2026-11-16T19:07:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PotatoDaniel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/potatodaniel/32/37524_2.png) [@PotatoDaniel](https://forum.makecode.com/u/PotatoDaniel)\
**Post date:** [November 16, 2026, 7:07pm UTC](https://forum.makecode.com/t/can-someone-help-me-idk-how-to-code-properly/47374/1 "2026-11-16T19:07:23Z")

</div>

I have been stressing out because I can’t really code my game link is [https://arcade.makecode.com/S55131-61430-44837-68574](https://arcade.makecode.com/S55131-61430-44837-68574) but I want to see ur guys work and so it’ll give ideas

---

<div class="post-metadata">

**Author:** ![BLADEr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blader/32/16422_2.png) [@BLADEr](https://forum.makecode.com/u/BLADEr)\
**Post date:** [November 17, 2026, 5:41am UTC](https://forum.makecode.com/t/can-someone-help-me-idk-how-to-code-properly/47374/2 "2026-11-17T05:41:20Z")

</div>

Welcome to the forums, PotatoDaniel!

Your code looks fine except you never declare “mySprite” in your code so as soon as you start the game, it crashes because mySprite doesnt exist!!!  
Add a “set mySprite to (sprite)” block in your menu function or somewhere before you start using the “mySprite” variable and you should be good!

Hope this helped!! :boom:

---

<div class="post-metadata">

**Author:** ![offtopic](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/offtopic/32/37054_2.png) [@offtopic](https://forum.makecode.com/u/offtopic)\
**Post date:** [November 17, 2026, 5:42am UTC](https://forum.makecode.com/t/can-someone-help-me-idk-how-to-code-properly/47374/3 "2026-11-17T05:42:31Z")

</div>

One problem is that mySprite isn’t created when you try to set the player’s image, leading to the game failing. One thing you could do is store the image in a variable then set the player image to it later.
