Hello, I've been working on my Datastores script for a while now but there's one last part I haven't been able to do yet. That's basically getting the children of the folder I'm holding all the values to save and saving them. The reason I want to do this is because there's going to be a lot of possible stuff to get in the game however I don't want the player to start w/ that stuff. For example, I'm making a system where rare items will spawn randomly and if a player touches it they'll get it. Anyways, this is what I have so far, but it doesn't work.
local items = {}
for i,values in pairs(player.Data:GetChildren()) do
table.insert(items,i,values)
end
DataStore:SetAsync(key, items)
Not quite sure what's going wrong but any help is appreciated!
