# Game Lab: Destroy and Recreate same player sprite

**URL:** <https://forum.code.org/t/game-lab-destroy-and-recreate-same-player-sprite/38613>\
**Category:** CS Discoveries\
**Tags:** csd-unit-3\
**Created:** [November 2, 2023, 6:18pm UTC](https://forum.code.org/t/game-lab-destroy-and-recreate-same-player-sprite/38613 "2023-11-02T18:18:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael.coyner](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@michael.coyner](https://forum.code.org/u/michael.coyner)\
**Post date:** [November 2, 2023, 6:18pm UTC](https://forum.code.org/t/game-lab-destroy-and-recreate-same-player-sprite/38613/1 "2023-11-02T18:18:05Z")

</div>

Hi-

Working on game where the player sprite is destroyed when it touches an enemy sprite, and the player sprite is recreated after 2 seconds. Is it possible to recreate that same player sprite?

I could move the player sprite off the screen instead of destroying it but wanted to see if its possible to destroy and then recreate it.

---

<div class="post-metadata">

**Author:** ![melynn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/melynn/32/4925_2.png) [@melynn](https://forum.code.org/u/melynn)\
**Post date:** [November 2, 2023, 8:32pm UTC](https://forum.code.org/t/game-lab-destroy-and-recreate-same-player-sprite/38613/2 "2023-11-02T20:32:54Z")

</div>

Hi @michael.coyner,

You sure can reuse a sprite after it is destroyed! You just need to use the createSprite again. There is a good example on the [documentation for destroy()](https://studio.code.org/docs/ide/gamelab/expressions/destroy) in the _Rain Rain Go Away_ example.

Hope that helps!  
~Michelle

---

<div class="post-metadata">

**Author:** ![michael.coyner](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@michael.coyner](https://forum.code.org/u/michael.coyner)\
**Post date:** [November 3, 2023, 11:37am UTC](https://forum.code.org/t/game-lab-destroy-and-recreate-same-player-sprite/38613/3 "2023-11-03T11:37:04Z")

</div>

I saw that but there is no toolbox option to create a sprite w/o the var. You have to remove the var in the show text. Am I not seeing that toolbox option??  
 ![atm1](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/7/721ae80cb5bc90447d004a66b6505cde3e008c3d.png)

---

<div class="post-metadata">

**Author:** ![melynn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/melynn/32/4925_2.png) [@melynn](https://forum.code.org/u/melynn)\
**Post date:** [November 3, 2023, 12:27pm UTC](https://forum.code.org/t/game-lab-destroy-and-recreate-same-player-sprite/38613/4 "2023-11-03T12:27:38Z")

</div>

Correct - there is not a create a sprite w/o the var. You wouldn’t need the var block again since the variable has been declared already as a global variable. You’ve probably figured out you can make it work with the x=\_\_\_ block from variables and then move the createSprite from the var sprite block.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/2/25214b820694e5f6312ad3bf48a40f255b206d1e.png)

Personally, I would quickly switch to text and remove the var and then switch back to blocks. You can make a suggestion to [support](https://support.code.org/hc/en-us/requests/new) for the addition of the block. I’m not sure it is used enough to make a block and may confuse kids. My thinking is if a student is savvy enough to destroy a sprite and then want to put it back, they can easily go to text and remove the var:)  
~Michelle

---

<div class="post-metadata">

**Author:** ![michael.coyner](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@michael.coyner](https://forum.code.org/u/michael.coyner)\
**Post date:** [November 13, 2023, 7:42pm UTC](https://forum.code.org/t/game-lab-destroy-and-recreate-same-player-sprite/38613/5 "2023-11-13T19:42:22Z")

</div>

that’s what I did…thx for the info:)
