# setVehicleNeonPower (Shared)

> Changes the brightness of a vehicle's neon.

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

## Syntax

```lua
bool setVehicleNeonPower(element element, float power)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | A vehicle, or a parent element: every vehicle below it changes too. |
| `power` | `float` | Brightness relative to the default: 1 is normal, 0 is dark. It cannot be negative. |

## Returns

`true` if it changed, `false` if it is not a vehicle. Raises an error if `power` is negative.

On the server, the change is sent to every client. On the client, it applies to this client only.

## Example

```lua
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    local t = 0
    setTimer(function()
        t = t + 0.2
        setVehicleNeonPower(vehicle, 1 + math.sin(t) * 0.5)
    end, 50, 0)
end
```

### Note

With a parent element (such as `root`), every vehicle below changes, but the return value is the element's own, which is not a vehicle: `false`.

## See also

- [getVehicleNeonPower (Shared)](https://wiki.mymp.gg/en/getVehicleNeonPower.md): Tells the brightness of a vehicle's neon.
- [setVehicleNeonColor (Shared)](https://wiki.mymp.gg/en/setVehicleNeonColor.md): Changes the colour of a vehicle's neon. The colour applies to every strip.
