# setElementPosition (Shared)

> Moves an element to a position in the world.

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

## Syntax

```lua
bool setElementPosition(element element, float x, y, z [, bool warp = true])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The element. |
| `x, y, z` | `float` | The new position. |
| `warp` | `bool` | Treat the change as a jump: on a client, the element and what is attached to it leave no motion blur between the old and the new position. *(default: `true`)* |

## Returns

`true` if it moved, `false` if the element has no position.

## Example

```lua
addCommandHandler("grove", function(player)
    setElementPosition(player, 2495.1, -1687.4, 13.5)
end)
```

## See also

- [getElementPosition (Shared)](https://wiki.mymp.gg/en/getElementPosition.md): Reads an element's position in the world.
- [setElementRotation (Shared)](https://wiki.mymp.gg/en/setElementRotation.md): Sets an element's 3D rotation in degrees.
- [setElementMatrix (Shared)](https://wiki.mymp.gg/en/setElementMatrix.md): Places and turns an element from a matrix.
