How do I change the pivot that my model :PivotTo

I’m attempting to use Roblox’s new :PivotTo method to move a model of parts to where I want it. I’m using it because the wiki says it’s faster than :SetPrimaryPartCFrame. The problem is :PivotTo is not actually setting the model’s primary part CFrame properly. When I call :PivotTo on my model, the primary part’s CFrame is set below what it should be, so my model looks sunk into the ground and looks bad.

What can I do to make :PivotTo act like :SetPrimaryPartCFrame and set the Primary Part’s CFrame without any further offsets?

Just worked on a solution for this

Here’s the Code:

function SetPrimaryPartCFrame(model: Model, newCFrame: CFrame): nil
	assert(model.PrimaryPart ~= nil, model.Name.." has no PrimaryPart")
	model:PivotTo(newCFrame:ToWorldSpace(model.PrimaryPart.CFrame:ToObjectSpace(model:GetPivot())))
	return
end

Hope this helps!