Pivot and PrimaryPart

:SetPrimaryPartCFrame() has obviously been out for a while by now, and the newer way of setting the CFrame of a model is now :PivotTo().

IIRC there’s some issues with :SetPrimaryPartCFrame(), such as it being inaccurate leading to models having offset from the CFrame u passed in.

Are there any major differences other than you don’t need a primary part to set the pivot?

Those issues would be floating point precision inaccuracies.

2 Likes

https://developer.roblox.com/en-us/api-reference/function/Model/SetPrimaryPartCFrame

PivotTo is more performant apparently. It also works on BaseParts instead of only models. You can also set a model’s pivot with the pivot editor in studio. I don’t think there is any reason you should be using :SetPrimaryPartCFrame over :PivotTo as migration is relatively seamless.

1 Like