# setElementRotation (Shared)

> Sets an element's 3D rotation in degrees.

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

## Syntax

```lua
bool setElementRotation(element element, float x, y, z)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The element. |
| `x, y, z` | `float` | Rotation in degrees about each axis. |

## Returns

`true` if it turned, `false` if the element has no rotation.

## Example

```lua
local object = createObject("kb_bandit_u", 2495, -1687, 13.5)
setElementRotation(object, 0, 0, 90)
```

## See also

- [getElementRotation (Shared)](https://wiki.mymp.gg/en/getElementRotation.md): Reads an element's rotation in degrees.
- [setElementPosition (Shared)](https://wiki.mymp.gg/en/setElementPosition.md): Moves an element to a position in the world.
- [setElementMatrix (Shared)](https://wiki.mymp.gg/en/setElementMatrix.md): Places and turns an element from a matrix.
