rconsoleinput Asynchronous

  • consoleinput
  • rconsoleinputasync

Read a line submitted through the script console. Show the console before calling when you want to wait for user input. Use the returned line as text input for a prompt. Parse or validate it before treating it as a number, filename, or setting.

Syntax
Luau
rconsoleinput() -> string

Parameters

This function takes no arguments.

Returns

string

The entered text. If the console is hidden, the function immediately returns an empty string.

Example

Example
Luau
rconsoleshow()
rconsoleprint("Enter your name:")
local name = rconsoleinput()
rconsoleinfo("Hello, " .. name)
Kawaii documentation