I’ve came to a small issue while I was scripting a building system. I need to be able to read model’s pivot offset so I can set the building grid appropriately, however I can’t seem to find how to access it.
From what I know, pivot tools are basically studio only, and you can’t modify the offsets using scripts, however it is nowhere stated that you cannot read them.
For instance, on the official documentation there is clearly stated that the property “Pivot Offset” is readable:
While it does say Read Parallel (for some reason), it is also listed as being Not Scriptable, which has the following description:
So you can’t origin via code.
However, (as I brought up in my original, now deleted posted), you should be able to make use of the WorldPivot property, which should provide similar data
PivotOffset is readable based on the API docs — it is marked as readable, but in practice, it’s only accessible for BaseParts, not Models.
For Model instances, the Pivot system is handled internally and doesn’t expose PivotOffset as a property you can access via Lua (even though Studio allows pivot editing). When you try to access Model.PivotOffset, it throws an error because the property doesn’t actually exist in the runtime environment, only in Studio tooling.
If you’re trying to align models to a building grid, what you can use instead is:
local pivotCFrame = model:GetPivot()
Then compute offset adjustments relative to that CFrame. This gives you the actual position and rotation of the model’s pivot in world space, which is often what you’d need for grid placement anyway.