I'm attempting to do something similar to this, but whenever I change the variable to true after clicking the next button or a picture, the object that I need the state to change just vanishes upon returning.