So, I have a table with the default player data I need to load/save, like below.
local DefaultStats = {
Stats = {
Points = 0,
Kills = 0,
Deaths = 0,
},
}
And I'm retrieving the DataStore like this.
local PlayerData = game:GetService("DataStoreService"):GetDataStore("TestData1")
Say I add another value to save, such as "Coins = 0,", then join the game, that value does not load since it wasn't saved on the current DataStore, TestData1 originally. If I change my DataStore name to say TestData2, I lose the previous data obviously, but the new value is loaded.
I'll need to be adding new values into the DataStore as time progresses, and I can't be resetting all the player data each time.
Is this an issue with how I'm saving/loading data, or is there something I'm missing with DataStores?

2 comments
In order to set new data, you can use GetAsync to see if it's nil, then set it to a Default value if it is.
Key? Is the key going to be the scope? Wheres da key?