PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

MoveDirection

Humanoid

Vector3

MoveDirection is a read-only property that describes the direction a Humanoid is walking in, as a unit vector along the X/Z axis. The direction is described in world space.

Because the property is read-only, it cannot be set by a Script or LocalScript.

The animation below visualizes the property:
A visualization of the MoveDirection property.


Code Samples


Walking Camera Bobble Effect

This LocalScript makes the camera bobble as the player’s character walks around, utilizing both the Humanoid’s CameraOffset and MoveDirection.
It should be parented inside of the StarterCharacterScripts so that it is distributed into a player’s character as expected.