[Solved] How to bring health variable in all scenes

Hello! Does anyone knows how can I bring with me my health from scene to another scene? I mean if my health is damage then my character went to another scene. the health must still be damaged. please help it’s not working on mine or I just don’t know how.

You need to use a global variable not a scene variable, that way it will be available and continue on all scenes…

I tried using the global variable and it doesn’t work :((

Ouch must be something else wrong. I would try making a new game with 2 scenes and just increment the global variable and display it on the first scene - switch to second scene and see if you can continue to increment from previous scene - if this works then use the same code in original game? Maybe show us your code?

never mind it works now i only need to restart the program thank you so much

1 Like