I’m making a system for loading the player’s base from being serialized into a dictionary. While trying to recreate the models in the correct position I found that only the model’s primary part is being moved with :PivotTo. The CFrame of the primary part itself is entirely correct.
function module.Deserialize(t)
if not t then return nil end
local base = game:GetService("ServerStorage").Base:Clone()
for modelName: string, instances in t do
for _, data in instances do
local model: Model = RS.BuildingParts:FindFirstChild(modelName, true):Clone()
model.Parent = base.BuildArea
model.PrimaryPart:PivotTo(CFrame.new(unpack(data.CFrame)))
end
end
return base
end
I’ve never had this happen before so I’m unsure what to do about it. I’ve already checked that all children are being loaded and tried putting a task.wait(1) before using :PivotTo but to no avail. Actually pivoting the model using the command bar works fine.