Glorpia Docs
Scripting / Pivot method

PivotTo()

Moves a BasePart to a target CFrame or moves and rotates a Model around its current pivot.

Syntax

instance:PivotTo(targetCFrame)

Parameters

NameTypeDescription
targetCFrameCFrameTarget world-space pivot position and rotation.

BasePart behavior

On a Part or SpawnLocation, PivotTo() sets that BasePart's world-space position and rotation to the target CFrame.

Luau
local part = workspace:FindFirstChild("Part")

if part and part:IsA("BasePart") then
    part:PivotTo(CFrame.new(0, 10, 0))
end

Model behavior

On a Model, PivotTo() moves and rotates all descendant BaseParts around the Model's current pivot.

Luau
local model = workspace:FindFirstChild("Vehicle")

if model and model:IsA("Model") then
    model:PivotTo(model:GetPivot() + Vector3.new(0, 5, 0))
end
The Model must contain at least one descendant BasePart. If a direct child named Torso exists and is a BasePart, Glorpia uses it as the pivot; otherwise it uses the first descendant BasePart it finds.

Related