Problem with saving and loading text input (SOLVED)

I have a problem with saving the text input (username of the player) and loading it when you come back to the game. Can someone tell me where I went wrong? I’ve been struggling with it for a few days now and I can’t find a solution at all😕
First screenshot is second scene of the game, and second screenshot is the first scene.


Can someone help me?:pray:

I’m not positive but I think you have the name variable backwards. You load the name into a scene variable but then set the scene variable to the value of the global variable. If I follow your pattern, you might need to switch it to change the text of global variable … to scene variable … like your other variables. I’m not positive which name you’re using for which so I left that blank.

@Keith_1357 I tried like this and it still doesn’t work. When I go back to the game, instead of displaying saved input text, Username text object is blank.


I think the problem is it saves and loads the name but then the empty input object’s txt is overwriting it.

Maybe, after getting the name from storage it could be set to the txt of the input object. Or add a condition to make sure the input box isn’t empty before saving it something like the txt of NewTextInput2 ≠ ""

@Keith_1357 I tried it like that and it worked! Thank you so much for help :blush:

1 Like