Assistence needed in coblocks

Helllo! i am currently searching for help in my game.
I made a tab called Numbergenerator, im trying to make a random number 1-6 to appear on a tablet and based on the number a certain amount of drinks is poured,ex: if it lands on a 2,you take 2 drinks. i have no idea how to do this and want to make it like an animation.
Thank you.

So sorry to forget but here is my version of the game:CoSpaces Edu :: Drink

Hi @Daniel_Ornelas, can you share your code as an image or allow remixing on your project?

Without seeing it, Iā€™m guessing you are directly setting the tablet text to a random number when clicked. To be able to re-use the same number, you need to store this in a variable.

Watch this video and see if you can work out how to store and use your random number in both your tablet and your drink animation, using a variable:

Let me know afterwards if you are still struggling with this concept.

Geoff @ TechLeap

Thanks for the respone! it has helped me alot with my game!

1 Like