setclipboard
Writes UTF-8 text to the system clipboard.
Syntax
Signature
setclipboard(Text: string) -> ()Aliases
toclipboardsetrbxclipboard
Parameters
| Parameter | Type | Description |
|---|---|---|
Text | string | UTF-8 clipboard text. |
Returns
| Type | Description |
|---|---|
() | None. |
Notes
Text must be no larger than 1 MiB and cannot contain NUL bytes. Invalid UTF-8 or a failed clipboard request raises an error.
Example
Luau
setclipboard("Copied by your script")