CFrame Teleportation Issues

I currently have a commission requiring me to replace old mannequins in the game with an updated system. Now, the amount of mannequins here is 50 - 300 so I decided to use the command bar for assistance. My issue here was I couldn’t set PrimaryPart because the position of the model would be the primary part and in this case, that would mess up the teleportation.


The picture above is the CFrame returned from v:GetModelCFrame(). After doing v:GetModelCFrame().Position, the position returned is 336.853546, 42.579895, -1228.95166. This position is correct however when I attempt to duplicate my model that will replace the original one, it’s the completely wrong position. Here’s my code:

local Mannequin = workspace.Mannequin for i,v in pairs(workspace:GetChildren()) do if v:IsA("Model") and v.Name == "test" then local Position = v:GetModelCFrame().Position v:Destroy() local Clone = Mannequin:Clone() Clone.Parent = workspace print(Clone) Clone:MoveTo(Position) end end

The MoveTo function can cause changes in the final position if there are parts / terrain in the way of your moving model. Try using SetPrimaryPartCFrame.

Should I set the primary part CFrame on the original model or the updated model?

Set the updated model’s CFrame to the old model’s CFrame.