---
title: "PivotTo()"
description: "Moves a BasePart to a target CFrame or moves and rotates a Model around its current pivot."
canonical: "https://docs.glorpia.com/scripting/functions/pivot-to"
markdown: "https://docs.glorpia.com/scripting/functions/pivot-to.md"
---
# PivotTo()

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

**Category:** Scripting / Pivot method

## Syntax

```luau
instance:PivotTo(targetCFrame)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `targetCFrame` | CFrame | Target 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
```

> **Note:** 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

- [GetPivot()](https://docs.glorpia.com/scripting/functions/get-pivot.md) — Read the current BasePart or Model pivot before moving it.
- [BasePart](https://docs.glorpia.com/instances/basepart.md) — Part and SpawnLocation transform properties.
- [Model](https://docs.glorpia.com/instances/model.md) — Grouped pivot behavior.
