PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. Instead, you should go to our new and improved documentation. You can also learn more about the future of documentation.
Collapse Sidebar

Orientation

BasePart

Vector3

The Orientation property describes the part’s rotation in degrees around the X, Y and Z axes using a Vector3. The rotations are applied in Y → X → Z order. This differs from proper Euler angles, and is instead Tait–Bryan angles which describe yaw, pitch and roll. It is also worth noting how this property differs from the CFrame.Angles() constructor, which applies rotations in a different order (Z → Y → X). For better control over the rotation of a part, it is recommended that /BasePart/CFrame is set instead.

When setting this property any Weld|Welds, ManualWeld|ManualWelds, Snap, Motor, and Motor6D|Motor6Ds connected to this part will have the matching JointInstance/C0|C0/JointInstance/C1|C1 property updated and to allow the part to move relative to any other parts it is joined to.

WeldConstraints will also be temporarily disabled and re-enabled during the move.


Code Samples


Part Spinner

This code sample rotates a part continually on the Y axis.