Collect cubes to open door

need some help
I’m trying to create a room with 6 small cubes that player needs to collect in order to open the door that leads out of the room but I can’t seem to find a code that would work. Any ideas what could do the trick?
thanks :slight_smile:

Have a variable count that starts at zero. Each time your player interacts with a cube, increment count and hide the cube. Once count reaches 6 you know that the cubes have been collected so can unlock the door.