How to make my score variable to work

Hello, I just got into blueprints in UE and I’m trying to make a puzzle game.
Basically there is 9 puzzle blocks, for example there are 2 “right” puzzles and 7 “wrong”.
When player click on 2 right puzzles he advances to next level.
So i made a variable “score” in the Puzzle block blueprint (

check screenshot). When player click on the right puzzle, he get’s +1 point, when he gets 2 points he advances to next level, but i can’t get more than 1 point. I click one puzzle = 1 point, click on 2nd puzzle, still 1 point. So my score doesn’t adds up. Do i need to make a score variable in another Blueprint intead of puzzle block blueprint? If so, how to move my score variable to make it work?
I would be very grateful if someone finds time to help me. Thanks in advance!

Yes, this is in my puzzle blueprint.
And on the left side is just an event OnClicked and setting material.
I tried to make it inside level blueprint, but I don’t know how to add event when Player click the puzzle here. I have 2 types of BP of puzzles, the "right’ puzzle, and “wrong” puzzle. How can i make that my Level Blueprint register when i click on puzzle? Tried casting to Puzzle BP, but didn’t seem to work.
Thank You so much for replying to me!

Is this inside one of your puzzle blueprints?

You can’t hold the score in one of the various blueprints, you need to keep it somewhere central.

Typical places for this kind of thing are the level blueprint or the game instance.

What is on the left of the bit of graph you’ve shown here?

it depends on how your puzzle pieces are spawned in the level. Did you drag them in from the content browser or did you spawn them with a blueprint?

You can just make an extra blueprint actor that contains the score variable and drop it in the level. Put a update score custom event in there:

You can talk to it from the puzzles using a reference:

339663-screenshot-11.png

Thank You so much! This helped me a lot. I couldn’t really reply to You earlier, there was something wrong with my account and i couldn’t log in to answear hub, had to contact support.