# AngularVelocity

AngularVelocity : `Constraint`

## Overview

A physics constraint instance used to rotate an Object at a constant angular velocity

The reference for the angular velocity depends on whether the RelativeTo property is set to World or Attachment.

## Properties

### AngularVelocity

`Vector3`

Sets the angular velocity.

#### Code Samples

```lua
local Part = script.Parent
local Attachment = Part.Attachment

local AngularVelocity = Instance.new("AngularVelocity")
AngularVelocity.Attachment0 = Attachment
AngularVelocity.AngularVelocity = Vector3.new(0, 3, 0)
AngularVelocity.MaxTorque = 1000
AngularVelocity.RelativeTo = Enum.ActuatorRelativeTo.World
AngularVelocity.Parent = Part
```

### MaxTorque

`number`

Sets the maximum torque (rotational force) allowed during rotation.

#### Code Samples

```lua
local AngularVelocity = script.Parent

AngularVelocity.MaxTorque = 10
```

### ReactionTorqueEnabled

`boolean`

Sets whether a reaction torque is applied when angular velocity is applied.

This property only works when RelativeTo property is set to Attachment1, applying equal and opposite torque to connected Parts when enabled.

#### Code Samples

### RelativeTo

`Enum.ActuatorRelativeTo`

Sets the reference coordinate system for applying force.

* World: The angular velocity vector is used as is.
* Attachment0: The angular velocity vector is transformed relative to Attachment0's CFrame (not recommended).
* Attachment1: The angular velocity vector is transformed relative to Attachment1's CFrame.

Setting RelativeTo to Attachment0 is possible but may cause abnormal physics behavior, as AngularVelocity is designed to apply torque to Attachment1.

Using Attachment0 as the reference can swap the reference point and force application targets, leading to unexpected rotation, unstable movement, or physics errors like collisions.

#### Code Samples

```lua
local AngularVelocity = script.Parent

AngularVelocity.RelativeTo = Enum.ActuatorRelativeTo.World
```

## Methods

## Events

## See also

{% content-ref url="/pages/92QXleNfbim97B0uhIQs" %}
[Physics](/manual/studio-manual/object/physics.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/development/api-reference/classes/angularvelocity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
