How to use the Transform and Pivot properties of a Part?

I have been away from Studio for 6 months and I don’t remember these properties in a Part.
What are these properties for?
How to use them?

1 Like

Both are studio-locked properties, so don’t really apply to programming much.

Pivot was released for beta earlier this year:

edit: Neither pivot nor transform are studio locked, in that you can access their functionality using object:GetPivot().

1 Like

Thanks, but what’s the difference between Data->Position and Transform->Origin Position.
What can I achieve by having different values in both properties?

I’m not completely sure what you mean, but either way they are tied to tools in studio. This means that they cannot be changed by a script out of studio. I would be surprised if they could be changed by a script at all.

For example, in a Part, I can have its Position as 0,0,0 and Origin Position as 10,10,10.
But I didn’t see any use for it, I didn’t see any difference when moving or rotating the part, having different values in both properties.
In fact, I still don’t understand what the Origin Position property is for.

I’m fairly sure it’s so that you can ‘pivot’ an instance from a position other than it’s regular origin. This would allow you to move/rotate it from a separate point of origin. If you use the pivot tool I’m sure you could get a better idea.

The article I linked could also explain in more detail.

1 Like

The key is Mode/Part:PivotTo(targetCFrame): That lets your code move an object “by” its pivot regardless of whether it’s a Part or Model or has a PrimaryPart. It’s even floating point error free unlike MoveTo / SetPrimaryPartCFrame.

3 Likes

Having read various articles on these properties I’m now slightly confused. Could you confirm whether or not the transform and pivot properties are studio locked, or whether one is and one isn’t? I had thought that both were only available for studio, but read that this might not be the case for transform?

The pivot is not Studio locked.

The origin properties in the Transform section are just a convenient studio only visual way to move the object, but you can do the same thing via code. Adding 1 to the Origin Position in Studio is the same as doing: object:PivotTo(object:GetPivot() + Vector3.new(1, 0, 0)) in Lua code.

The reason that there’s no OriginPosition / OriginOrientation property is that it would be ambiguous whether setting it moves the object or just changes where the pivot is while leaving the object in the same place.

3 Likes