# getElementRotation (Shared)

> Reads an element's rotation in degrees.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Elements
- **URL**: https://wiki.mymp.gg/en/getElementRotation

## Syntax

```lua
vec3|false getElementRotation(element element)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The element to read. |

## Returns

A `vec3` with the rotation in degrees, or `false` if the element has no rotation.

## Example

```lua
local rotation = getElementRotation(localPlayer)
outputDebugString(("Heading: %d°"):format(rotation.z))
```

## See also

- [setElementRotation (Shared)](https://wiki.mymp.gg/en/setElementRotation.md): Sets an element's 3D rotation in degrees.
- [getElementPosition (Shared)](https://wiki.mymp.gg/en/getElementPosition.md): Reads an element's position in the world.
- [getElementMatrix (Shared)](https://wiki.mymp.gg/en/getElementMatrix.md): Reads an element's 4x4 matrix, built from its position and rotation.
