Hi guys, I'm playing around with weapon pickups & saving/loading assets from the data store. lets say I have a key named "Asset" inside a datastore which is a table with lets say 3 variables so the key's structure will be something like:
Asset = {
a = 1
b = "string"
c = true
}
If I only wanted to edit "c = false", how do i go about doing that? The only solution i know of is to grab the entire table, store it inside a variable, then edit c's value inside that variable, and upload the entire table from that variable back into the server. But just to update a single variable's value by doing this seems really inefficient. Is there a better way?
I know this wont work but is there something like:
DS = game:GetService("DataStoreService")
dsuser = DS:GetDataStore("WepDS",userkey)
dsuser:setAsync("Asset".c,false) --Yeah that .c wont work i know :P

3 comments
Yes, you're right. As for using keys rather than table, I used table because it wanted it to look neat when using the datastore plugin. In actuality, Asset is my sword, var a,b, and c are the sword stats. So if i powerup the sword, c's value would change. Note: WepDS can hold more than 1 similar sword for a player, therefor using 3 keys rather than table would be a whole lot of mess
ah in that case if you want to use a table, you'll just have to save the table with the new value
Yup i guess I"ll have to overwrite the entire thing. Now i see why there aren't any conventional RPG games made in roblox. All of them are very limited :P