setclipboard
Writes the clipboard.
Syntax
setclipboard(text: string) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | The text value to process. |
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
setclipboard is part of the Input library. Input helpers either read the current OS input state or synthesize OS-level events. Some game interactions also require the Roblox window to be focused.
The change is applied directly to the live target, so later reads observe the updated value.
The aliases toclipboard(text), setrbxclipboard(text) resolve to the same implementation.
Example
setclipboard("hello")
toclipboard("hello")
setrbxclipboard("hello")
Notes
- Aliases:
toclipboard(text),setrbxclipboard(text). - Synthetic input may be ignored by games that validate input origins.