Class · inherits Instance
PVInstance
Abstract class for all objects that have a physical location in the world.
About PVInstance
A PVInstance is an abstract class that cannot be created. It is the
base for all objects that have a physical location in the world.
Properties 2
Origin
: CFrameNotReplicatedNotScriptableEditor-only property that reads and sets the worldCFrameof thePVInstance's pivot, moving the entire instance when changed from the Studio Properties window.Editor-only property, shown in the Studio Properties window as Origin Position and Origin Orientation under Transform. Its value is the world-space
CFrameof the instance's pivot; reading it returns the sameCFrameasPVInstance.GetPivot. It has no stored value of its own and always reflects the current pivot.Setting it from the Properties window moves the whole instance so its pivot lands at the new
CFrame, much likePVInstance.PivotTo. Editing through the Properties window temporarily disablesWeldConstraintsto other objects for the move;PivotTodoes not modify joints.Not available to scripts; use
PVInstance.GetPivotandPVInstance.PivotToat runtime instead.Pivot Offset
: CFrameNotReplicatedNotScriptableEditor-only property that displays and edits the pivot'sCFramerelative to the instance, moving only the pivot and leaving the instance in place.Editor-only property, shown in the Studio Properties window as Pivot Position and Pivot Orientation under Pivot. It is the
CFrameof the pivot relative to the instance's own frame.Changing it from the Properties window moves the pivot relative to the instance while leaving the instance in place, unlike
Origin, which moves the whole instance. For aBasePart, the offset defaults to the identityCFrame, so the pivot coincides with the part's center. For aModel, this property appears only when the model has aPrimaryPart; it then reflects and edits that part'sPivotOffset, andModel.GetPivotaliases the primary part's pivot.Not available to scripts; scripts read and write the equivalent through the concrete class, such as
BasePart.PivotOffset.
Methods 2
GetPivot
() → CFrameGets the pivot of aPVInstance.This function gets the pivot of a
PVInstance. This is often used withPVInstance.PivotToto move a model.ModelsandBasePartsare bothPVInstances("Position Velocity Instances") and so both have this function.PivotTo
(targetCFrame: CFrame) → ()Transforms thePVInstancealong with all of its descendantPVInstancessuch that the pivot is now located at the specifiedCFrame.Transforms the
PVInstancealong with all of its descendantPVInstancessuch that the pivot is now located at the specifiedCFrame. This is the primary function that should be used to moveModelsvia scripting.BasePartsare moved in this way by having theirCFrametransformed by the necessary offset.Modelsare moved in this way by having theirModel.WorldPivottransformed by the necessary offset.Note that for efficiency purposes,
Object.Changedevents are not fired forPositionandOrientationofBasePartsmoved in this way; they are only fired forCFrame.When calling
PivotToonModels, the offsets of the descendant parts and models are cached, such that subsequent calls toPivotToon the same model do not accumulate floating point drift between the parts making up the model.ModelsandBasePartsare bothPVInstances("Position Velocity Instances") and so both have this function.
PVInstance also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.