So, I have a game that uses DataStore2. I use DataStore2 to save a table in which the player's skins are held. My code is as follows:
local skinsData = DataStore2("skins", player)
local skins = skinsData:Get("Tornado")
-- Don't worry about this code.
local debrisData = DataStore2("debris", player)
local debrisDataValue = debrisData:Get()
local price = ServerStorage.Skins[item].Price
if debrisDataValue >= price.Value and not owned then
debrisData:Increment(-price.Value)
-- NEED HELP HERE!!!!!!!!
return true
end
Ok, so where I put "NEED HELP HERE," I have tried the following solutions: table.insert(skinsData, item) - Doesn't work skinsData:Increment(item) - Errors skinsData:Set(skinsData, item) - Errors
How would I simply add this to the existing table??

1 comment
Hi, I'm having the same problem with datastore2, can you help me?(https://scriptinghelpers.org/questions/113983/how-to-save-a-table-using-datastore2). I'm trying to make a weapon datastore2 but it's been a week struggling and I've also posted 2 other post with no reply. Help please.