So what I'm trying to do is save a block's data to a dictionary, then add that dictionary to a table. Then on, I could save it to the client's datastore.
What I'm dealing with:
Whenever I do this I get an error stating that the table data is nil.
Script:
local objects = workspace.Objects
local data = {}
for i,v in pairs(objects:GetChildren()) do
local bu = {
Name = "Box",
PosX = v.Position.X,
PosY = v.Position.Y,
PosZ = v.Position.Z,
Rot = v.Rotation.Value
}
table.insert(data, bu)
end
I don't know why, but I know I'm doing something wrong.
