Question about DataStore2 Previous Save Files

So DataStore2 creates a new save data everytime it saves instead of overwriting the previous save data right? My question, what will happen to the previous save files if there’s already a lof of save data from a player? Does the datastore2 script automatically delete the previos save files if there’s already a lot? I’m concerned that there might be a problem if there’s too many save data. Someone knows? Thank you!

1 Like

As far as I know it does overwrite previous data. Datastores work with Key - Value pairs, so you can’t keep many values under one key (unless you use a table, but thats completely different thing).

So for example when you do Experience = 10, then do Experience = 20, it cannot keep the 10 value, because it can hold only one value, which is now 20.

As for problems. I am using DataStore2 in a huge game with complicated and lots of data, like player clothes, inventory items and stats. I haven’t experienced any lag or data loss, neither did anyone to my knowledge, using DataStore2.

Yeah, I mean those inside the keys. It looks like this.

Everytime it saves, it adds another number with the latest save data. So it’ll just stay like that from 1 to the highest number everytime it saves? Or it’ll delete “1” in the long run when there’s too much number?