How do I make an on clicked event add a value to counter?

I have a game where you are given options In a widget by clicking on buttons that take you to the next scenario. How can I make it so every button has a coded value and it adds them all up at then end. For example level 2 option 1 has a value of 30$ and option 2 has a value of 10$ After the player completed the level I want that value to be added to the total so on final screen it will read how well the player did playing the game. I have been trying for a few weeks to figure it out. Any suggestions?? Or Help?

I have a game instance created Now I just need to know how to make the button edit the game instance. Please help I am on a timeline.


I’m not really sure what you are describing, it seems to me you’re over-complicating things.

What I understand:
You want to have a total score variable (perhaps an integer).

To do this: Simple have a variable for the CurrentGame score, once the game is finished, add the CurrentGame score to TotalScore.

To store this TotalScore to save the game progress, you can use a SaveGame blueprint.