# Dragger

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/Dragger/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/Dragger

A helper object used to create tools that can drag parts.

## Methods

### AxisRotate

```luau
Dragger:AxisRotate(axis: Enum.Axis? = Enum.Axis.X)
```

- Tags: Capabilities: Physics

Rotates the currently dragged part(s) by 90 degrees on the given axis.

Parameters:

- `axis`: The `Axis` (`X`, `Y`, or `Z`) around which to rotate.

### MouseDown

```luau
Dragger:MouseDown(mousePart: Instance, pointOnMousePart: Vector3, parts: { Instance })
```

- Tags: Capabilities: Physics

Initializes a dragging action, specifying which parts to use when dragging.

Parameters:

- `mousePart`: The [`BasePart`](https://rapi.sleaze.dev/classes/BasePart.md) under the mouse that serves as the drag handle. Must be a member of `parts` and must be in the [`Workspace`](https://rapi.sleaze.dev/classes/Workspace.md).
- `pointOnMousePart`: A [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) in the local coordinate space of `mousePart` indicating where the mouse initially contacted the part.
- `parts`: An array of `BaseParts` to move together during the drag. Must include `mousePart` and contain at least one element.

### MouseMove

```luau
Dragger:MouseMove(mouseRay: Ray)
```

- Tags: Capabilities: Physics

Tries to move the currently dragged part to the point where MouseRay hits another part.

Parameters:

- `mouseRay`: A [`Ray`](https://rapi.sleaze.dev/index/types/Ray.md) representing the current mouse position in world space (origin at the camera, direction toward the pointer).

### MouseUp

```luau
Dragger:MouseUp()
```

- Tags: Capabilities: Physics

Stops the current dragging action (made by [`Dragger:MouseDown()`](https://rapi.sleaze.dev/classes/Dragger.md)).

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
