I am a little confused on what you mean, a data store should save the final data that player has in a game. The article I provided above should have the answers to your data store problem. Could you elaborate more on what you mean? Another thing to note, if you are saving Values and not items, then there is no point in having a table, just add the data to the data store.
You shouldn’t be updating a datastore whenever a value changes; there is a limit on the number of requests you can make per minute. You should save player data:
when they leave the game,
periodically (like every five minutes or so), and/or
when the game closes down
Also, depending on the data you are saving you don’t really need to convert it into a JSON string. Datastores accept tables like any other value as long as it is serializable. (i.e. not containing references to any parts or other instances)
Let me catch you there: you don’t need to encode anything you send to a DataStore at all. This is done internally (both the key and the value need to be coerced to a string format to be acceptable for DynamoDB). JSONEncoding data you intend to save to a DataStore will just bloat how many characters your data takes up.
Ok sorry by not responding, i forgot why i made this post:
Since my game uses alot of values, i think it should be unecessary do this:
local ds1 = DataStore:GetDataStore("1")
local ds2 = DataStore:GetDataStore("2")
local ds3 = DataStore:GetDataStore("3")
local ds4 = DataStore:GetDataStore("4")
local ds5 = DataStore:GetDataStore("5")
local ds6 = DataStore:GetDataStore("6")
local ds7 DataStore:GetDataStore("7")
And instead of having too much datastores, i want to keep one, and to do that, i must use tables i guess.