# setClipboard (Client)

> Copies a text to the player's computer clipboard.

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

## Syntax

```lua
bool setClipboard(string text)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `text` | `string` | The text. |

## Returns

`true`.

## Example

```lua
addCommandHandler("copypos", function()
    local pos = getElementPosition(localPlayer)
    setClipboard(("%.2f, %.2f, %.2f"):format(pos.x, pos.y, pos.z))
end)
```

## See also

- [createTrayNotification (Client)](https://wiki.mymp.gg/en/createTrayNotification.md): Shows a system notification in the Windows tray, while the game is not focused.
