So i made a article on this yesterday about saving the build. It worked (thanks guys!). But, there is a big flaw when the DataStore saves the data. It makes all the values I want to save in to one? So that means I can't load the build without it having a error because of the Position value I saved since it add the values up. How can I make the dictionary of values not turn in to one value? Here are the links to the scripts I have:
Save Script: https://pastebin.com/Y2W3kckk
game.ReplicatedStorage.SaveBuild.OnServerEvent:Connect(function(player)
local partTable = {}
for i, inst in pairs(workspace:GetChildren()) do
if inst.Name == "BuiltBlock" then
local position = {
X = inst.Position.X,
Y = inst.Position.Y,
Z = inst.Position.Z
}
local material = inst.Material
local color = inst.BrickColor
local size = inst.Size
partTable[i] = {Position = position, Material = tostring(material), Color = tostring(color), Size = tostring(size)}
end
end
local success, err = pcall(function()
BuildsDataStore:SetAsync(player.UserId, partTable)
end)
if success then
print("Saved player build.")
elseif not success and err then
print("Not successful: "..err)
end
end)
Load Script:
game.ReplicatedStorage.LoadBuild.OnServerEvent:Connect(function(player)
local s,e = pcall(function()
local build = BuildsDataStore:GetAsync(player.UserId)
for i, tab in pairs(build) do
local block = Instance.new("Part",workspace)
block.Name = "BuiltBlock"
block.Position.X = tonumber(tab.Position.X)
block.Position.Y = tonumber(tab.Position.Y)
block.Position.Z = tonumber(tab.Position.Z)
block.Size = tonumber(tab.Size)
block.Material = tab.Material
block.BrickColor = tab.Color
end
end)
if s then
print("Successfully loaded build!")
elseif not s and e then
print("Not successful: "..e)
end
end)
Error when loaded: Not successful: X cannot be assigned to
Data that was saved in the block tables: https://i.imgur.com/WdY9wr1.png
Please answer my question!! -- DragonSpawner12 :D

1 comment
I just wanna add a comment here. The size property was optional since I made all the blocks the same size: 4,4,4. And also, thank you for this response! It helped me A BUNCH!