I want to save some information stored in different folders within the player. Would it be possible to get a subtable, as shown below, from the data retrieved by the GetAsync() function?
If I do this…
local data = {}
data.subTable = {
cash = 100,
}
local key = "MyKey"
local success, errorMessage = pcall(function()
dataStore:SetAsync(key, data)
end
if not success then
warn(errorMessage)
end
Could I do this…
local data
local key = "MyKey"
local success, errorMessage = pcall(function()
data = dataStore:GetAsync(key)
end
if success then
--would this access the subtable and print 100?
print(data.subTable.cash)
else
warn(errorMessage)
end