Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can you Save a Table inside a table in dataStores? I keep Getting UTF errors in output

Asked by 4 years ago
local DataStore = game:GetService("DataStoreService"):GetDataStore('Gay')



game.Players.PlayerAdded:Connect(function(player)
    local GotAsync = DataStore:GetAsync(player.UserId)

    if GotAsync then
        print(GotAsync.Tbl1)
    end

end)

game.Players.PlayerRemoving:Connect(function(player)

    local Tbl = {}
    local Tbl1 = {'ger','sdf','r2r'}
    local Tbl2 =  {}

    table.insert(Tbl,Tbl1)
    table.insert(Tbl,Tbl2)


    DataStore:SetAsync(player.UserId,Tbl)
end)

Whenever I try saving in the player removing it keeps saying

104: Cannot store Array in data store. Data stores can only accept valid UTF-8 characters.

so am i doing anythng wrong if so How can I save a table inside a table

Answer this question