# isLineOfSightClear (Client)

> Tells whether nothing blocks the segment between two points. Only buildings and objects block it, not vehicles or peds.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: World and weather
- **URL**: https://wiki.mymp.gg/en/isLineOfSightClear

## Syntax

```lua
bool isLineOfSightClear(float startX, startY, startZ, float endX, endY, endZ)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `startX, startY, startZ` | `float` | Where the segment starts. A `vec3` also works. |
| `endX, endY, endZ` | `float` | Where the segment ends. A `vec3` also works. |

## Returns

`true` if the way is clear.

## Example

```lua
local function canSee(ped)
    return isLineOfSightClear(getElementPosition(localPlayer), getElementPosition(ped))
end
```

## See also

- [processLineOfSight (Client)](https://wiki.mymp.gg/en/processLineOfSight.md): Casts a ray between two points and returns the first thing it hits.
- [getGroundPosition (Client)](https://wiki.mymp.gg/en/getGroundPosition.md): Finds the ground right below a point, up to 1000 m down. Only buildings and objects count.
