# Vector3

The Vector3 data type represents a vector in 3D space, typically usually used as a point in 3D space or the dimensions of a rectangular prism. Vector3 supports basic component-based arithmetic operations (sum, difference, product, and quotient) and these operations can be applied on the left or right hand side to either another Vector3 or a number. It also features methods for common vector operations, such as Cross() and Dot().

Some example usages of Vector3 are the Position, Rotation, and Size of parts, for example:

local part = workspace.Partpart.Position = part.Position + Vector3.new(5, 2, 10) -- Move part by (5, 2, 10)

Vector3 is also commonly used when constructing more complex 3D data types such as CFrame. Many of these data types' methods will use a Vector3 within their parameters, such as CFrame:PointToObjectSpace().

#### Math Operations

The following math operations are valid for the Vector3 data type:

Operation | Description |
---|---|

Vector3 + Vector3 | Produces a Vector3 with each component of the second added to the corresponding component of the first. |

Vector3 - Vector3 | Produces a Vector3 with each component of the second subtracted from the corresponding component of the first. |

Vector3 * Vector3 | Produces a Vector3 with each component of the second multiplied by the corresponding component of the first. |

Vector3 / Vector3 | Produces a Vector3 with each component of the first divided by the corresponding component of the second. |

Vector3 * number | Produces a Vector3 with each component multiplied by the number. |

Vector3 / number | Produces a Vector3 with each component divided by the number. |

## Summary

### Constructors

### Properties

### Methods

Returns the angle in radians between the two vectors. If an axis is provided, it determines the sign of the angle.

### Math Operations

## Constructors

## Properties

The x-coordinate of the Vector3.

The y-coordinate of the Vector3.

The z-coordinate of the Vector3.

### Magnitude

The length of the Vector3.