Hello, I hope for your help, let's get right to the problem. I apologize in advance if there is a crooked translation, I am from Russia, I translated with a translator.
I am creating a game on this platform and I need to make sure that when the player opens the second screen (Screen 2), the value of the variable is set to 0 on the first launch. On this screen, the player presses the button to go further, when the variable value is 0, the button is blocked. As soon as the player presses the button, under the condition that the value is 0, the button is blocked and the variable is assigned to 1. Then the player moves to another screen, where he performs various tasks and eventually returns to the same screen. As he completes all the tasks on the other screen, upon return, the value of the variable is 4 and the player can press the button and go to the next level. That's basically all the logic.
The main problem is that when the player moves to this screen, the variable is not initialized as 0, but initialized as a void. That is, it does not matter at all. Accordingly, there is no first stage, the player simply cannot press the button so that it locks and he goes to perform tasks on another screen.
Please help me, I will try to answer all your questions.