DS2 (DataStore 2) Won't Save Table

Hi! I’m trying to save a table in DS2, but it always comes out with

Invalid at input.SKINS.Skins.2 because: Invalid type (Instance)

game.Players.PlayerRemoving:Connect(function(plr: Player)
    local skinsStore = ds2(skinsKey, plr)
    local plrSkinFolder = findPlayerSkinFolder(plr) -- works fine
    
    local playerSave = {
        Skins = {}
    }
    
    for index, value in pairs(plrSkinFolder:GetChildren()) do
        table.insert(playerSave.Skins, value)
    end
    
    print(playerSave)


    skinsStore:Set(playerSave) -- error appears here
end)

This is what skins printed as:

["Skins"] =  ▼  {
     [1] = 25,
     [2] = sxdfcyguhlj,
     [3] = yftcygvhjkblk,
     [4] = fcgvhjk
-- a bunch of random strings that was in my plrSkinFolder
  }
}

Any help is appreciated.

You can’t save tables in Datastore 2

table.insert(playerSave.Skins, value.Value)*

You cant save an Instance to the DataStore.

But I’m saving a table, just inserting instances, in this case string values into a table and then just saving it.

Edit: I didn’t see that you added the value.Value, trying that out now

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.