Model
Groups parts and other instances so they can be moved, scaled, and queried together.
Functions
`instance:SetPrimaryPart`
Sets the part used as this model's primary reference part.
`instance:GetPrimaryPartCFrame`
Returns the PrimaryPart CFrame, or the WorldPivot when no PrimaryPart is set.
`instance:GetPivot`
Returns the model's world pivot CFrame.
`instance:SetPivot`
Sets the model pivot and moves child parts by the same transform offset.
`instance:PivotTo`
Moves the model to a new pivot CFrame.
`instance:MoveTo`
Moves the model pivot to a world position while preserving its orientation.
`instance:TranslateBy`
Offsets the model pivot and child parts by a world-space vector.
`instance:RotateBy`
Rotates the model around its current world pivot.
`instance:ScaleTo`
Scales BasePart descendants around the model pivot.
`instance:ScaleByFactor`
Scales sized descendants around the model pivot.
`instance:GetExtentsSize`
Returns the axis-aligned bounding size of all child parts.
`instance:GetBoundingBox`
Returns the model pivot and bounding size for all child parts.
`instance:GetCenter`
Returns the center point between child part positions.
`instance:GetAllParts`
Returns all descendant parts with Size and CFrame properties.
`recurse`
Returns all descendant parts with Size and CFrame properties.
`instance:IsEmpty`
Returns whether the model has no direct children.
`instance:SetVisible`
Sets descendant part transparency to visible or hidden.
`instance:SetTransparency`
Sets transparency on every descendant part.
instance:SetPrimaryPart
Sets the part used as this model's primary reference part.
Arguments
part: anyReturns
instance:GetPrimaryPartCFrame
Returns the PrimaryPart CFrame, or the WorldPivot when no PrimaryPart is set.
Arguments
Returns
CFrameinstance:GetPivot
Returns the model's world pivot CFrame.
Arguments
Returns
CFrameinstance:SetPivot
Sets the model pivot and moves child parts by the same transform offset.
Arguments
cf: CFrameReturns
instance:PivotTo
Moves the model to a new pivot CFrame.
Arguments
cf: CFrameReturns
instance:MoveTo
Moves the model pivot to a world position while preserving its orientation.
Arguments
pos: Vector3Returns
instance:TranslateBy
Offsets the model pivot and child parts by a world-space vector.
Arguments
offset: Vector3Returns
instance:RotateBy
Rotates the model around its current world pivot.
Arguments
rotCF: CFrameReturns
instance:ScaleTo
Scales BasePart descendants around the model pivot.
Arguments
factor: numberReturns
instance:ScaleByFactor
Scales sized descendants around the model pivot.
Arguments
factor: numberReturns
instance:GetExtentsSize
Returns the axis-aligned bounding size of all child parts.
Arguments
Returns
Vector3instance:GetBoundingBox
Returns the model pivot and bounding size for all child parts.
Arguments
Returns
CFrame, Vector3instance:GetCenter
Returns the center point between child part positions.
Arguments
Returns
Vector3instance:GetAllParts
Returns all descendant parts with Size and CFrame properties.
Arguments
Returns
{ any }recurse
Returns all descendant parts with Size and CFrame properties.
Arguments
parentReturns
{ any }instance:IsEmpty
Returns whether the model has no direct children.
Arguments
Returns
booleaninstance:SetVisible
Sets descendant part transparency to visible or hidden.
Arguments
visible: booleanReturns
instance:SetTransparency
Sets transparency on every descendant part.
Arguments
t: numberReturns
API
instance:SetPrimaryPart(part: any)
instance:GetPrimaryPartCFrame(): CFrame
instance:GetPivot(): CFrame
instance:SetPivot(cf: CFrame)
instance:PivotTo(cf: CFrame)
instance:MoveTo(pos: Vector3)
instance:TranslateBy(offset: Vector3)
instance:RotateBy(rotCF: CFrame)
instance:ScaleTo(factor: number)
instance:ScaleByFactor(factor: number)
instance:GetExtentsSize(): Vector3
instance:GetBoundingBox(): CFrame, Vector3
instance:GetCenter(): Vector3
instance:GetAllParts(): { any }
instance:recurse(parent): { any }
instance:IsEmpty(): boolean
instance:SetVisible(visible: boolean)
instance:SetTransparency(t: number)