How do I add 2 variable and show it on text?

I want to add up 2 of the red number below and show it at the “Score” text there. But I keep getting 0 at the moment. Sorry, I am a beginner.

I did this.
Change the scene variable “AnswerValue” : set to Variable(FirstValue) + Variable(SecondValue)

Change the text of Score: set to “Score” + VariableString(AnswerValue)

The text object expects a text, not a number, but to add variables like this you need to get them as numbers. The solution is converting the numbers to a string after adding them together: ToString(Variable(FirstValue) + Variable(SecondValue))

1 Like

That works! Thanks you for helping! Can I ask another question on the 4 boxes containing 22?

How can I set a random number in it with one of the boxes containing the actual answer of the equation?

First use the action Set text to ToString(RandomInRange(Variable(Answer) - 20, Variable(Answer) + 20)), then in a second event just after use the condition pick a random object and set text to ToString(Variable(Answer))

1 Like

After picking a random object, I just set text return value? Thanks for the guide though