So I am trying to load a table that I saved in datastore, the problem is that it says that the table "LoadTable" is empty. And yes, the the DataStore table was saved correctly, so it is not empty, I checked in a DataStore manager plugin.
Here is the code:
local LoadTable = {}
local success, errormessage = pcall(function()
local data = SaveDataStore:GetAsync(Player.UserId.."_Progress_A")
for i,v in ipairs(data) do
table.insert(LoadTable,#LoadTable+1,data[#data+1])
for i,v in ipairs(LoadTable) do
print(v)
end
end
end)

3 comments
im looking at "(Player.UserId.." rn, wheres the input for it? the function has no parameters, and the functions itself has no plr.userid being set, you literally don't have any input so nothing comes out, and there's no error message because it prints nothing because there's no input, from what i see. When you call this function, make it a paremeter called Player and call the function with the par
Oh no. That's in another part of the code. I forgot to mention that this is the only important part of the code, and also the part that I need help with. Everything does correspond to a variable and stuff.
Your table.insert is making my eyeballs hurt. Why are you inserting table values into a different table? Why not just iterate data. Also confirm API access is enabled.