# Adding points to the scoreboard and destroy sprites

**URL:** <https://forum.makecode.com/t/adding-points-to-the-scoreboard-and-destroy-sprites/1367>\
**Category:** Help\
**Created:** [March 10, 2020, 1:10pm UTC](https://forum.makecode.com/t/adding-points-to-the-scoreboard-and-destroy-sprites/1367 "2020-03-10T13:10:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mina](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mina](https://forum.makecode.com/u/mina)\
**Post date:** [March 10, 2020, 1:10pm UTC](https://forum.makecode.com/t/adding-points-to-the-scoreboard-and-destroy-sprites/1367/1 "2020-03-10T13:10:43Z")

</div>

I’m creating a treasure maze game, and there are two levels in the game. The coding down below is for level one, it is used to add on point to the scoreboard when my character overlaps the treasure and at the same time, the treasure will disappear.

 ![Screen Shot 2020-03-10 at 7.47.48 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/92bca0ba0232b7c6e644801860475a350d91c59a.png)  
However, it doesn’t work for me when I try the same thing for level two, the character would just keep bouncing back to where it was when it overlaps the treasure. Can someone help me with that? Any tips would be helpful. 🙂

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [March 10, 2020, 3:15pm UTC](https://forum.makecode.com/t/adding-points-to-the-scoreboard-and-destroy-sprites/1367/2 "2020-03-10T15:15:18Z")

</div>

Hello, @mina!

In the `destroy` blocks, change the variable to `otherSprite`. If it doesn’t appear in the drop-down when you click on the arrow, you can always drag it from the top of the function. That should take care of you.

Longer answer: When those functions run, two variables are created. The `sprite` variable represents the first sprite involved in the collision (`Player` for your functions), and the `otherSprite` variable represents the second sprite (`fox`, `Food`, etc. for your functions).
