I’m a LITTLE familiar with data storing but I would like some advice.
I’m making a game that track’s player progression
I asked my friend and he said he’d store it on like module scripts in folders or something.
What I used to do is similar but I’ve never worked with huge data to be stored before, most I did was like a ban list and that’s it. And It’s only linked to the game not the player.
So how would you guys suggest me to store it on the game’s workspace/explorer?
I would be happy to help you, but I don’t really understand what you mean. If you’re talking about saving player data across sessions, then you would have to use a datastore. If you need a code example, then feel free to tell me.
Could you explain what kind of data you want to save? But it needs to be on the server, so it will not work in StarterPlayerScripts but it works in ServerScriptService if done correctly.
I’m assuming you mean you want to save/load data and add values into a folder to change the data.
Like @SpringwoodOfficial said, you would need to have data handling (saving/loading) on the server and not the client as it can’t save data on player devices.
You would do as normal, create functions to save data periodically/when the player leaves and load data when they join. Then, create a folder in ServerStorage and create value instances and other folder for table-like values inside that folder imitating how their data is set up in DataStoreService. These will be your data values. Finally add a .Changed event and connect a function to those values to change your data when the values are changed.
Again, sorry if I got it wrong, but you didn’t give a coherent question to work with.
I keep progression of everything in game, even the things I do save to a datastore.
When loading I read the datastore, when they exit I save the datastore..
if you’re going todo something thats large in data say 1000 items in an inventory then directly accessing data is way better instead of accessing instances, better for that cause with say 1000 items there might be extra load time if you use instances cause you’re waiting on them to all load
i personally prefer doing instances anyway (more of a preference thing) cause of having folders as the main thing then attributes tied to folders, if you have a loading screen then doing instances doesnt really matter anyways, and one good thing about doing something like instances is that the client can access from anywhere cause its tied to the explorer compared to having to use something like a replicaclient module to access data on the client
What do you mean? You’d create a DataObject in one script yes, I suggest you use ProfileStore for now, to understand how it works, then you can jump some time later to creating your own DataStore system