Skip to main content

Clipboard:copy()

Copy a string into the system clipboard.

Parameters

ParametersTypeDescription
textstringThe text to copy

Signature

Clipboard:copy(text: string): void

Returns

void

Examples

Clipboard:copy("sample.user@example.com")
local otp = "482991"
Clipboard:copy(otp)

Notes

  • The copied value replaces the current clipboard text
  • After copying, you can use Clipboard:paste() to paste it into a focused field