# setElementInterior (Shared)

> Changes an element's interior.

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

## Syntax

```lua
bool setElementInterior(element element, int interior)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The player, ped, vehicle, object, sound or light. |
| `interior` | `int` | Interior, an integer from 0 to 255. 0 is the outside world. |

## Returns

`true` if it applied, `false` if the element is not a player, ped, vehicle, object, sound or light. Raises an error if `interior` is outside 0 to 255.

Unlike the dimension, it does not change the children. When the interior changes, it fires `onElementInteriorChange` (on the server) or `onClientElementInteriorChange` (on a client).

## Example

```lua
addCommandHandler("ammu", function(player)
    setElementInterior(player, 1)
    setElementPosition(player, 285.8, -41.5, 1001.5)
end)
```

## See also

- [getElementInterior (Shared)](https://wiki.mymp.gg/en/getElementInterior.md): Reads the interior an element is in. Interior 0 is the outside world.
- [setElementDimension (Shared)](https://wiki.mymp.gg/en/setElementDimension.md): Changes the dimension of an element and of all its children.
- [onElementInteriorChange (Server)](https://wiki.mymp.gg/en/onElementInteriorChange.md): Fired after an element moves to another interior. It does not fire when the interior stays the same.
