# How do I make a restart button that clears all previous sprites?

**URL:** https://community.thunkable.com/t/how-do-i-make-a-restart-button-that-clears-all-previous-sprites/2079125
**Category:** Questions about Thunkable X
**Created:** [October 11, 2022, 11:52pm UTC](https://community.thunkable.com/t/how-do-i-make-a-restart-button-that-clears-all-previous-sprites/2079125 "2022-10-11T23:52:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![benjaminmorehouse777](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@benjaminmorehouse777](https://community.thunkable.com/u/benjaminmorehouse777)
#### Post date: [October 11, 2022, 11:52pm UTC](https://community.thunkable.com/t/how-do-i-make-a-restart-button-that-clears-all-previous-sprites/2079125/1 "2022-10-11T23:52:13Z")

</div>

Hello,

I am new to Thunkable and I spent the last 8 hours trying to code an asteroid game. I cannot figure how to make the old Asteroids go away. I’ve tried “remove all sprites in Asteroid Group” but it it still persists after I begin anew.

Here is a link to my project: [Thunkable](https://x.thunkable.com/copy/cbb549621b4f733072e496affe90f55c)

I am new to this, so if you need to see the code another way, please let me know.

Thanks a lot

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [October 12, 2022, 12:11am UTC](https://community.thunkable.com/t/how-do-i-make-a-restart-button-that-clears-all-previous-sprites/2079125/2 "2022-10-12T00:11:01Z")

</div>

I don’t use the Canvas much so I could be wrong but I think what’s happening is that you are creating Asteroid Groups and then attempting to remove all sprites _inside_ an Asteroid Group which is a single sprite group. So you might create a bunch of “Asteroid Groups” and then your remove blocking is only deleting one of them.

I’m not sure how you would fix this but you could try these blocks:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/d/1d1a2da6a6b55b88a44b9fed379be631e36d96cd.png)

Or these blocks:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1b4afc27565d1c5f7cae10d22128ce203188be09.png)

---

<div class="post-metadata">

### Author: ![benjaminmorehouse777](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@benjaminmorehouse777](https://community.thunkable.com/u/benjaminmorehouse777)
#### Post date: [October 12, 2022, 3:40am UTC](https://community.thunkable.com/t/how-do-i-make-a-restart-button-that-clears-all-previous-sprites/2079125/3 "2022-10-12T03:40:14Z")

</div>

Thanks for the reply. I played around with a couple commands and functions and still couldn’t quite get it. I took your advice and went back to the “Asteroid Groups” and played around with it for a while. I found when I limit it to 2 asteroids I don’t have the problem. When I change it to “3+” I immediately get the problem of asteroids staying on the screen during the consecutive playthroughs. I even made another sprite, using the same code, and made that new sprite “1” just to see if it would give me the same problems… and it did. For whatever reason if there is more than 3 falling objects they linger on the screen after collision. There are no problems if the code is at 2 or less falling objects.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [October 12, 2022, 3:54am UTC](https://community.thunkable.com/t/how-do-i-make-a-restart-button-that-clears-all-previous-sprites/2079125/4 "2022-10-12T03:54:42Z")

</div>

I tried some variations on the remove blocks and didn’t have any luck either. Hopefully someone else with more experience with sprites can help.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [January 10, 2023, 3:54am UTC](https://community.thunkable.com/t/how-do-i-make-a-restart-button-that-clears-all-previous-sprites/2079125/5 "2023-01-10T03:54:48Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
