DataModule help

I’m currently making a datastore module, and I ran into a problem, a script loops through the folder that the data is kept in, it adds the name to the table. But I want to add the value and the name, so like this local table = {dataBool.Value}
Heres the script I have already.

local TableToSave = {}

for i,data in pairs(FolderToSave:GetChildren()) do
			table.insert(data.Name, TableToSave)
            print("Saving "..i.." Items")
		end

You have the table.insert() the other way around:

table.insert(TableToSave, data.Name) 

Can you help for what I was asking for though (fixed)

tables[boolValue.Name] = boolValue.Value

You’d use a dictionary and store the BoolValue’s name as a key/field and its associated value would be the BoolValue’s value.

Would I put this inside of the for loop, instead of table.insert?