rconsoleinput Asynchronous

  • consoleinput
  • rconsoleinputasync

Wait for one line typed into the visible script console. Use it for a small prompt, then parse the returned text yourself.

Syntax
Luau
rconsoleinput() -> string

Parameters

This function takes no arguments.

Returns

string

The submitted line as a string; an empty string immediately if the console is hidden.

Usage notes

Show the console first. The function waits while the input row is visible and the user has not submitted a line.

Example

Example
Luau
rconsoleshow()
rconsoleprint("Enter a label, then press Enter:")
local label = rconsoleinput()
print("Label:", label)
Kawaii documentation