# onClientColShapeHit (Client)

> Fired when a player, ped, vehicle or object enters a collision shape on this client.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Event
- **Side**: Client
- **Category**: Collision shapes
- **URL**: https://wiki.mymp.gg/en/onClientColShapeHit

## Syntax

```lua
addEventHandler("onClientColShapeHit", root, function(element hitElement, bool matchingDimension) ... end)
```

## Handler parameters

| Name | Type | Description |
| --- | --- | --- |
| `hitElement` | `element` | The element that entered. |
| `matchingDimension` | `bool` | Whether the element is in the same dimension as the shape. |

## Source

The collision shape (`colshape`).

## Example

```lua
local zone = createColSphere(2488.0, -1666.0, 13.3, 5)

addEventHandler("onClientColShapeHit", zone, function(hitElement, matchingDimension)
    if hitElement == localPlayer and matchingDimension then
        outputDebugString("You entered the shop")
    end
end)
```

### Note

The event fires in any dimension; check `matchingDimension`.

## See also

- [onClientColShapeLeave (Client)](https://wiki.mymp.gg/en/onClientColShapeLeave.md): Fired when a player, ped, vehicle or object leaves a collision shape on this client.
- [onClientElementColShapeHit (Client)](https://wiki.mymp.gg/en/onClientElementColShapeHit.md): Fired on a player, ped, vehicle or object when it enters a collision shape on this client.
- [createColSphere (Shared)](https://wiki.mymp.gg/en/createColSphere.md): Creates a spherical collision shape.
