So I don't know what to do at all. I have a folder of all the placed items for that player. I want to make it so when they leave and rejoin the placed models/buildings are still their and in the same position as when you left.
I've done this before, and it works like a charm.
What i do is loop over each block and save the x,y,z position & rotation as such:
local basedata = {} for _,v in pairs(base:GetChildren()) do local tab = { v.Name, v.Position.X, -- You might want to add base-offset to this if you build on bases instead of a free world. v.Position.Y, v.Position.Z, v.Rotation.X, v.Rotation.Y, v.Rotation.Z } table.insert(basedata,tab) end DS:SetAsync("Basedata",basedata)
For loading you then clone the block with the specific name (tab[1]
), and set it's CFrame to
CFrame.new(Vector3.new(tab[2],tab[3],tab[4])) * CFrame.Angles(math.rad(tab[5]),math.rad(tab[6]),math.rad(tab[7]))