# Player kind and variables erasing

**URL:** https://forum.makecode.com/t/player-kind-and-variables-erasing/37692
**Category:** Help
**Tags:** game
**Created:** [July 1, 2025, 4:48pm UTC](https://forum.makecode.com/t/player-kind-and-variables-erasing/37692 "2025-07-01T16:48:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Taison](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/taison/32/23189_2.png) [@Taison](https://forum.makecode.com/u/Taison)
#### Post date: [July 1, 2025, 4:48pm UTC](https://forum.makecode.com/t/player-kind-and-variables-erasing/37692/1 "2025-07-01T16:48:13Z")

</div>

Hello 👋,

I am having some stressful news, you know the _set mySprite of kind player_ block?  
Well, my variables and the kind of the player keep erasing! I always have to add them again.  
Does anyone have the same issue, and is there a way to fix it?

Thanks, Taison.

---

<div class="post-metadata">

### Author: ![mmurray1019](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmurray1019/32/23334_2.png) [@mmurray1019](https://forum.makecode.com/u/mmurray1019)
#### Post date: [July 1, 2025, 4:58pm UTC](https://forum.makecode.com/t/player-kind-and-variables-erasing/37692/2 "2025-07-01T16:58:07Z")

</div>

I have been having the same issue. I don’t know how to fix it, but try deleting all of your duplicate assets and making sure they all have names (I read that might help the problem).

---

<div class="post-metadata">

### Author: ![Rubberducky271](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rubberducky271/32/9685_2.png) [@Rubberducky271](https://forum.makecode.com/u/Rubberducky271)
#### Post date: [July 1, 2025, 5:54pm UTC](https://forum.makecode.com/t/player-kind-and-variables-erasing/37692/3 "2025-07-01T17:54:10Z")

</div>

nah me too, its a makecode bug. frequently save and go to version history as I think that works, I have a with more info

---

<div class="post-metadata">

### Author: ![mmurray1019](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmurray1019/32/23334_2.png) [@mmurray1019](https://forum.makecode.com/u/mmurray1019)
#### Post date: [July 2, 2025, 5:06pm UTC](https://forum.makecode.com/t/player-kind-and-variables-erasing/37692/4 "2025-07-02T17:06:00Z")

</div>

I may have found a solution, but I can’t get the problem to happen again to test my theory.

1. Save your project
2. convert it to javascript
3. copy the part at the top that looks like this:

> **code**
>
> namespace SpriteKind {  
> export const display = SpriteKind.create()  
> export const koopaGreen = SpriteKind.create()  
> export const offScreenKoopaGreen = SpriteKind.create()  
> export const OffScreenEnemy = SpriteKind.create()  
> …  
> }

1. hold on to that code (paste it in a comment?) so that you can copy it when you need
2. put your project back into blocks
3. when the error occurs, go into javascript and paste the code we copied at the top

This should work in theory, because it is replacing the code that is being deleted. I will let you know if it works for me.

---

<div class="post-metadata">

### Author: ![mmurray1019](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmurray1019/32/23334_2.png) [@mmurray1019](https://forum.makecode.com/u/mmurray1019)
#### Post date: [July 7, 2025, 8:56pm UTC](https://forum.makecode.com/t/player-kind-and-variables-erasing/37692/5 "2025-07-07T20:56:38Z")

</div>

Just got the problem: pasting the code in javascript and switching back to blocks worked for me. Just make sure to save your project first in case it doesn’t work for some reason.

---

<div class="post-metadata">

### Author: ![Taison](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/taison/32/23189_2.png) [@Taison](https://forum.makecode.com/u/Taison)
#### Post date: [July 7, 2025, 9:11pm UTC](https://forum.makecode.com/t/player-kind-and-variables-erasing/37692/6 "2025-07-07T21:11:38Z")

</div>

Just in case you need to take a look at my code, here is the link:

> **[Levels](https://arcade.makecode.com/S52880-64008-80355-76189)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

P.S. I recommend that if you ever take a look at my code, zoom out  
Their is more hidden and scattered across my project
