rconsoleinput
Reads a line of text input from the executor console window.
function rconsoleinput(): stringSynopsis
How it works
Reads a line of text from the console's input buffer using
ReadConsoleA:
HANDLE hIn = GetStdHandle(STD_INPUT_HANDLE);
ReadConsoleA(hIn, buf, bufSize, &charsRead, NULL);
This call blocks the Luau thread until the user presses Enter. The returned string includes the trailing newline. The console must be created with rconsolecreate() first.Usage
Prompt user
rconsolecreate()
rconsoleprint("Enter your name: ")
local name = rconsoleinput()
rconsoleprint("Hello, " .. name .. "\n")Returns
string The line of text entered by the user.
Deprecated
Deprecated. This function blocks the thread and has no modern replacement. Consider UI-based alternatives.