setclipboard Synchronous
Clipboard.setsetrbxclipboardsyn.write_clipboardtoclipboard
Put text on the Android clipboard so the user can paste a result into another app. This replaces whatever clipboard text was there before.
Luau
setclipboard(text: string) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | The string to copy. |
Returns
()No values.
Usage notes
Copy text that the user expects to share, such as an export code or a short diagnostic.
Example
Luau
local code = "EXAMPLE-1234"
setclipboard(code)
print("Code copied to clipboard")