# getColPolygonHeight (Shared)

> Returns between which heights a collision polygon detects elements.

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

## Syntax

```lua
float, float getColPolygonHeight(element shape)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `shape` | `element` | A collision shape made by `createColPolygon`. |

## Returns

The floor and the ceiling. Without limits, they are the lowest and highest possible numbers.

## Example

```lua
local floor, ceiling = getColPolygonHeight(lot)
outputDebugString(("From %.1f to %.1f"):format(floor, ceiling))
```

## See also

- [setColPolygonHeight (Shared)](https://wiki.mymp.gg/en/setColPolygonHeight.md): Limits between which heights a collision polygon detects elements.
- [createColPolygon (Shared)](https://wiki.mymp.gg/en/createColPolygon.md): Creates a collision shape shaped like a flat polygon, with no height limit until setColPolygonHeight gives it one.
