Glorpia Docs
Scripting / Pivot method

GetPivot()

Returns the world-space pivot CFrame of a BasePart or Model.

Syntax

instance:GetPivot()

Supported classes

NameTypeDescription
BasePartCFrameReturns the part's current CFrame.
ModelCFrameReturns the Model pivot chosen from its descendant BaseParts.

Example: BasePart

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

if part and part:IsA("BasePart") then
    print(part:GetPivot().Position)
end

Example: Model

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

if model and model:IsA("Model") then
    local pivot = model:GetPivot()
    print(pivot.Position)
end
If a Model has no descendant BaseParts, GetPivot() raises a runtime error.

Related