ive been trying to make a datasave to save a model, and while it does work, it makes more than 5 times of the part counts. why?
local datasave = game:GetService("DataStoreService") game.Workspace.RemoteEvent.OnServerEvent:Connect(function(plr,model) local parts = {} local pos = {} local props = {} for i,v in pairs(model:GetDescendants()) do if v:IsA("BasePart") then table.insert( props, { ["Color"] = v.BrickColor.Name; ["Rotation"] = v.Rotation; ["Anchored"] = v.Anchored; } ) table.insert(pos,v.Position) v:Destroy() end end for _,m in pairs(parts) do print(m) end for _,f in pairs(pos) do print(f) end wait(1) for i,v in pairs(props) do for _,m in pairs(pos) do local e = Instance.new("Part") e.Parent = model e.Position = m e.BrickColor = BrickColor.new(v.Color) e.Rotation = v.Rotation e.Anchored = v.Anchored end end end)