Help Creating "Save Progress"

Hey everyone! In the past 2 years I’ve been working on a singleplayer story game.
And after developing all systems and buildings, I finally came to what I consider the most important part: The save progress

This is very important, as my game is very long, so it is good that people doesn’t lost all their progress after lefting the game.

What do you want to achieve?
A save progress that saves the player progress in the story so they continue playing from where they left. The save could be scripted, but not chapter based, because beside my game having a bunch of different chapters, they are very long so it’s not a big deal to save between them (increasing the number of chapters is an option).

How the game works?
Basically everything is scripted. The player goes do something then the next script plays (I hope you got it).

What have you tried so far?
One thing that I’ve planned in my mind is inserting a leaderstat value called “State” then when every script that handles the story is running it increases the “State” value, so when the the player values are saved and the player lefts it gets the “State” value and calls a script that requires that specific value and it “continues” from where the player left.

I don’t know if this is the best or most optimal way to do that, so I’m open for opinions. Thank you for reading this long and boring text :kissing_smiling_eyes:

Before I got to the “What have you tried so far?” section, I thought about using the same method as you.
As you stated, I would initially create a value that increases everytime the player advances, save that value when the player leaves, and load it when the player rejoins and continue increasing it as the player advances.

This seems like the most favorable way of doing this to me (depending on the game’s set-up, of course), however someone else may prefer another pathway for doing this, and they may even provide an explanation of how their solution includes better performance.

1 Like

Go to Roblox documentation and you will find the data store to save player data. Here is the link