# Need debug in my game

**URL:** <https://forum.makecode.com/t/need-debug-in-my-game/6662>\
**Category:** Help\
**Created:** [March 9, 2021, 10:17pm UTC](https://forum.makecode.com/t/need-debug-in-my-game/6662 "2021-03-09T22:17:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [March 9, 2021, 10:17pm UTC](https://forum.makecode.com/t/need-debug-in-my-game/6662/1 "2021-03-09T22:17:56Z")

</div>

Here is my game: [https://makecode.com/\_Jcq29hi9oTDJ](https://makecode.com/_Jcq29hi9oTDJ)

I need help to debug it so when I shoot it doesn’t destroy every enemy sprite. I just need it to destroy one sprite at a time. I know the reason (when the game updates, it’s making a sprite called myEnemy, and it duplicates but doesn’t change the name, so there’s no difference between the two sprites) but I cant figure out how to fix it. Also, moving it outside of the function won’t work, since if I do that then the code can’t identify the sprite I want to destroy
