# getElementDimension (Shared)

> Reads an element's dimension, from 0 to 65535.

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

## Syntax

```lua
int getElementDimension(element element)
```

## Parameters

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

## Returns

The dimension's number.

## Example

```lua
if getElementDimension(localPlayer) ~= 0 then
    outputDebugString("You are in another dimension.")
end
```

## See also

- [setElementDimension (Shared)](https://wiki.mymp.gg/en/setElementDimension.md): Changes the dimension of an element and of all its children.
- [getElementInterior (Shared)](https://wiki.mymp.gg/en/getElementInterior.md): Reads the interior an element is in. Interior 0 is the outside world.
