Score count not working right

Can some one explain what’s the situation. The score saved in to game instance which works fine but when I play the game again it adds that score on to existing score saved in the game instance. So if previous score is 5 and in the next game I is 2 then in shows 7. I would like to stay 5 if the new score is less then 5 or 6 if the new score is higher. Do I need to save my Score saved hi first. Also when I wana restart the game I need the score to be saved. Can some one point in the right direction. These whole thing is pain in the A. Thank you!!!

Not gonna lie, that entire set-up is odd/confusing. Not sure exactly what you are trying to do. Sounds like you need to actually “save” and “load” game data though if you want to keep a high score running. Also you said some confusing stuff like “The score saved in to game instance which works fine but when I play the game again it adds that score on to existing score saved in the game instance”. The game instance doesn’t “remember” anything once you exit the PIE, it only persists as long as you are continuously playing. So not sure what you mean by that.

No worries I got it all figured out. How ever how do you save integer in the Game Instance that holds your score information with Game Save. Thank’s .

You need to create a save game object with the same variable you want to save as your game instance and pass that data to the save game object and pull it back out and set the game instance variable when you hit play again. Below is a link to a tutorial I made that shows you how to do this.