# setCursorAlpha (Client)

> Changes the mouse cursor's opacity.

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

## Syntax

```lua
bool setCursorAlpha(float alpha)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `alpha` | `float` | Opacity from 0 (invisible) to 255 (opaque). |

## Returns

`true` if it changed. `false` if the value is outside 0 to 255.

While the console is open, the cursor shows opaque.

## Example

```lua
showCursor(true)
setCursorAlpha(0)
```

## See also

- [showCursor (Client)](https://wiki.mymp.gg/en/showCursor.md): Shows or hides the mouse cursor for this resource.
- [isCursorShowing (Client)](https://wiki.mymp.gg/en/isCursorShowing.md): Tells whether the mouse cursor is showing.
