rconsoleinput Asynchronous
consoleinputrconsoleinputasync
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.
Luau
rconsoleinput() -> stringParameters
This function takes no arguments.
Returns
stringThe entered text. If the console is hidden, the function immediately returns an empty string.
Example
Luau
rconsoleshow()
rconsoleprint("Enter your name:")
local name = rconsoleinput()
rconsoleinfo("Hello, " .. name)