setclipboard Synchronous

  • Clipboard.set
  • setrbxclipboard
  • syn.write_clipboard
  • toclipboard

Put text on the Android clipboard so the user can paste a result into another app. This replaces whatever clipboard text was there before.

Syntax
Luau
setclipboard(text: string) -> ()

Parameters

Function parameters
ParameterTypeDescription
textstringThe 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

Example
Luau
local code = "EXAMPLE-1234"
setclipboard(code)
print("Code copied to clipboard")
Kawaii documentation