# How to add a score to a game in Thunkable X

**URL:** <https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178>\
**Category:** Questions about Thunkable X\
**Created:** [September 12, 2019, 11:13pm UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178 "2019-09-12T23:13:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![317094wv](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/317094wv/32/47802_2.png) [@317094wv](https://community.thunkable.com/u/317094wv)\
**Post date:** [September 12, 2019, 11:13pm UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/1 "2019-09-12T23:13:57Z")

</div>

I’m having trouble figuring out how to add a score to my game in Thunkable X. For example, changing the number of coins you get when you press yes or no on an alert. Can someone please help me?

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [September 12, 2019, 11:17pm UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/2 "2019-09-12T23:17:11Z")

</div>

When click yes button (was confirmed block)set the from coins get text + 1.then set it’s variable with stored. 🤔

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [September 12, 2019, 11:23pm UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/3 "2019-09-12T23:23:02Z")

</div>

Something like this  
 ![Screenshot_2019-09-13_071942](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cd5584bd8a7135a070005b97f55bb464228c6450.jpeg)  
[https://x.thunkable.com/projects/5d7ad1a1a3f63268b468d81f/7d3e2ce3-7a2c-4f9e-aa33-6a65ca53fac6/blocks](https://x.thunkable.com/projects/5d7ad1a1a3f63268b468d81f/7d3e2ce3-7a2c-4f9e-aa33-6a65ca53fac6/blocks)

---

<div class="post-metadata">

**Author:** ![317094wv](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/317094wv/32/47802_2.png) [@317094wv](https://community.thunkable.com/u/317094wv)\
**Post date:** [September 13, 2019, 3:31am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/4 "2019-09-13T03:31:48Z")

</div>

Thank you so much, you’re a life-saver! 😁

---

<div class="post-metadata">

**Author:** ![vaishali.r666dzchc3](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vaishali.r666dzchc3](https://community.thunkable.com/u/vaishali.r666dzchc3)\
**Post date:** [May 23, 2021, 11:39am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/5 "2021-05-23T11:39:50Z")

</div>

hello…can anyone help me with adding score of player 1 and player 2  
here is the link  
[https://x.thunkable.com/copy/893bfc1089bfe0e30d0ed2fb680024d4](https://x.thunkable.com/copy/893bfc1089bfe0e30d0ed2fb680024d4)

---

<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:** [May 23, 2021, 4:37pm UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/6 "2021-05-23T16:37:08Z")

</div>

When you post a question, especially if it includes a link to a project, please explain the problem you are having and where we might look (which screen, which label or other component, which blocks) to find it.

---

<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:** [May 23, 2021, 4:41pm UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/7 "2021-05-23T16:41:28Z")

</div>

The problem is that these two variables are different when they should be the same:

 ![Screen Shot 2021-05-23 at 9.40.16 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/c/fc56802cfc21b02b165bade936aa59dfb949813c.png)

---

<div class="post-metadata">

**Author:** ![vaishali.r666dzchc3](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vaishali.r666dzchc3](https://community.thunkable.com/u/vaishali.r666dzchc3)\
**Post date:** [May 24, 2021, 4:53am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/8 "2021-05-24T04:53:05Z")

</div>

So I am building an app called dice war in this app there are two players (Player1,Player2).  
The First Chance is of player1,So the player1 should click on Check The Dice Number when he clicks it the app shows the dice number which = player1 Score, So just like this the player2 also plays next it will be again player1 turn zo when he clicks on the button the app shows the dice number , now the app should add the Scores but I don’t know the codes for that.  
SORRY for the not explaining properly here is the link now  
[https://x.thunkable.com/copy/9c653aff7d4cbaebddfcd46e86d8023b](https://x.thunkable.com/copy/9c653aff7d4cbaebddfcd46e86d8023b)

---

<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:** [May 24, 2021, 6:11am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/9 "2021-05-24T06:11:02Z")

</div>

It would be good if you could explain what a few rounds look like. For example:

Player 1 rolls 3  
Player 1’s score = 3  
Player 2 rolls 5  
Player 2’s score = 5

Player 1 rolls 6  
Player 1’s score = 9  
Player 2 rolls 1  
Player 2’s score = 6

Is that how it’s supposed to work?

---

<div class="post-metadata">

**Author:** ![vaishali.r666dzchc3](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vaishali.r666dzchc3](https://community.thunkable.com/u/vaishali.r666dzchc3)\
**Post date:** [May 24, 2021, 6:35am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/10 "2021-05-24T06:35:22Z")

</div>

yep

---

<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:** [May 24, 2021, 7:34am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/11 "2021-05-24T07:34:51Z")

</div>

Then you need to add some addition (+) blocks in order to add the number that was rolled to the current player’s total.

---

<div class="post-metadata">

**Author:** ![vaishali.r666dzchc3](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vaishali.r666dzchc3](https://community.thunkable.com/u/vaishali.r666dzchc3)\
**Post date:** [May 24, 2021, 8:13am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/12 "2021-05-24T08:13:23Z")

</div>

can u tell me the codes

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 24, 2021, 9:52am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/13 "2021-05-24T09:52:56Z")

</div>

Have a look in the math drawer. You’ll find the blocks you need for adding values together. 🙂

---

<div class="post-metadata">

**Author:** ![vaishali.r666dzchc3](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vaishali.r666dzchc3](https://community.thunkable.com/u/vaishali.r666dzchc3)\
**Post date:** [May 25, 2021, 3:55am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/14 "2021-05-25T03:55:21Z")

</div>

ok …should I create a variable as Score then  
should I add the variables number and Score = Player1 Score

---

<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:** [May 25, 2021, 4:51am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/15 "2021-05-25T04:51:54Z")

</div>

Sounds good!

---

<div class="post-metadata">

**Author:** ![vaishali.r666dzchc3](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vaishali.r666dzchc3](https://community.thunkable.com/u/vaishali.r666dzchc3)\
**Post date:** [May 25, 2021, 5:46am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/16 "2021-05-25T05:46:59Z")

</div>

Is it correct ?

---

<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:** [May 25, 2021, 5:48am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/17 "2021-05-25T05:48:11Z")

</div>

I said it sounds good but you should try it to make sure it works for you.

---

<div class="post-metadata">

**Author:** ![vaishali.r666dzchc3](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vaishali.r666dzchc3](https://community.thunkable.com/u/vaishali.r666dzchc3)\
**Post date:** [May 25, 2021, 5:48am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/18 "2021-05-25T05:48:29Z")

</div>

ok

---

<div class="post-metadata">

**Author:** ![vaishali.r666dzchc3](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vaishali.r666dzchc3](https://community.thunkable.com/u/vaishali.r666dzchc3)\
**Post date:** [May 25, 2021, 5:54am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/19 "2021-05-25T05:54:31Z")

</div>

Is it the way I told  
 ![Screenshot 2021-05-25 112013](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/1/f1c5d2d8102f26ac07127b8b4bc6d7bf57bb25e2.png)

---

<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:** [May 25, 2021, 6:07am UTC](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178/20 "2021-05-25T06:07:24Z")

</div>

That’s going to take the number that was rolled and add it to the score and then save that value as the number variable. I don’t think that’s what you want!

> [@vaishali.r666dzchc3](#):
>
> should I add the variables number and Score = Player1 Score

To translate what you wrote, you would have blocks that say:

Number + Player 1 Score = Player 1 Score

But since Thunkable works left to right, your blocks should be:

**Set Player 1 Score to Player 1 Score + Number**

You’re also going to need separate variables for each player’s score (Player 1 Score and Player 2 Score).

[Next page](https://community.thunkable.com/t/how-to-add-a-score-to-a-game-in-thunkable-x/224178.md?page=2)
