# getLightCone (Client)

> Reads the opening and the edge hardness of a spot light's cone.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Lights
- **URL**: https://wiki.mymp.gg/en/getLightCone

## Syntax

```lua
float|false getLightCone(light light)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `light` | `light` | The light. |

## Returns

Two numbers: the angle in degrees from the axis and the hardness, from 0 to 0.99, or `false` with a wrong argument.

## Example

```lua
local light = createSpotLight(0, 0, 10, 0, 0, -1)
local angle, hardness = getLightCone(light)
outputDebugString(angle .. " " .. hardness) -- 30 0.5
```

### Note

Spot lights only. On a point or rect light it logs a warning naming its type and returns `false`.

## See also

- [setLightCone (Client)](https://wiki.mymp.gg/en/setLightCone.md): Changes the opening and the edge hardness of a spot light's cone.
- [getLightSourceRadius (Client)](https://wiki.mymp.gg/en/getLightSourceRadius.md): Reads the size of a spot light's bulb.
