# Help ! How to check results in a dice roll with multiple players?

**URL:** https://community.thunkable.com/t/help-how-to-check-results-in-a-dice-roll-with-multiple-players/564956
**Category:** Questions about Thunkable X
**Tags:** beginner, dice
**Created:** [May 6, 2020, 7:55pm UTC](https://community.thunkable.com/t/help-how-to-check-results-in-a-dice-roll-with-multiple-players/564956 "2020-05-06T19:55:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![samuelbaudrillartwuc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/samuelbaudrillartwuc/32/61683_2.png) [@samuelbaudrillartwuc](https://community.thunkable.com/u/samuelbaudrillartwuc)
#### Post date: [May 6, 2020, 7:55pm UTC](https://community.thunkable.com/t/help-how-to-check-results-in-a-dice-roll-with-multiple-players/564956/1 "2020-05-06T19:55:00Z")

</div>

Hi guys !

I am currently creating a small tool to help in the card game Magic the Gathering. Before I move on to the life-point counting part, I make a small roll of dice to find out who starts. It is possible to roll the dice for 2, 3 or 4 players.

I managed to code my dice roll but when it comes to know which of the 2, 3 or 4 players is winning, that’s where it gets complicated to me.

My approach was as follows:

- create a variable (list) which will store the results
- sort in descending order
- ask if the first value in my list (theoretically the winner) matches to player 1,2,3…
- store the winner’s name in a variable and display it later in a message.

And with this code, the dice is rolling good but nothing happens after… I despair ^^  
If a good soul could help me, that would be awesome !

Thank you in advance to all!  
Kind regards,  
Sam

p.s : here’s a picture of my code so far

 ![Code_MTG](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/3/53652a1c242391bfc3c05e04af4c931f82ad944a.png)

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [June 30, 2020, 7:12pm UTC](https://community.thunkable.com/t/help-how-to-check-results-in-a-dice-roll-with-multiple-players/564956/2 "2020-06-30T19:12:28Z")

</div>

Hey @samuelbaudrillartwuc

Did you ever manage to get this working in the end?

This seems like a good strategy to me, but I’d recommend using cloud variables instead of local variables.

Hope that helps!

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:25am UTC](https://community.thunkable.com/t/help-how-to-check-results-in-a-dice-roll-with-multiple-players/564956/3 "2024-11-08T11:25:15Z")

</div>


