Console
Colors and globals
The Roblox-style rconsole functions and the @@COLOR@@ tokens.
For scripts that expect the classic rconsole* functions, the same console is available as globals.
Functions
| Global | Behaviour |
|---|---|
rconsoleprint(text, color) | Prints without a line break. Understands colour tokens. The optional color is a colour name such as "RED" |
rconsoleinfo(text) | Print as info, with a line break |
rconsolewarn(text) | Print as a warning |
rconsoleerr(text), rconsoleerror(text) | Print as an error |
rconsoledebug(text) | Print as debug |
rconsoleclear() | Same as rconsole.clear() |
rconsolename(title), rconsolesettitle(title) | Same as rconsole.name(title) |
rconsolecreate() | Same as rconsole.open() |
rconsoledestroy() | Same as rconsole.close() |
rconsoleshow(), rconsolehide() | Show or hide the window |
rconsoleinput(prompt) | Same as rconsole.input(prompt) |
consoleclear() | Same as rconsole.clear() |
consolesettitle(title) | Same as rconsole.name(title) |
printconsole(...) | Same as rconsole.print(...) |
Colour tokens
Inside rconsoleprint text, a token like @@RED@@ changes the colour of everything after it. Use @@DEFAULT@@ to go back.
rconsoleprint("@@LIGHT_GREEN@@ready@@DEFAULT@@ to go\n")
Available colours:
BLACK, BLUE, CYAN, GREEN, MAGENTA, RED, WHITE, YELLOW, LIGHT_BLUE, LIGHT_CYAN, LIGHT_GRAY, LIGHT_GREEN, LIGHT_MAGENTA, LIGHT_RED, LIGHT_YELLOW, DARK_GRAY, DEFAULT.
Text that looks like a token but is not a colour name is printed as it is. Notes:
rconsoleprintdoes not add a line break. Add\nyourself.- The colour set by a token or by the
colorargument stays until you change it. - With
rconsole.mirror(true), the tokens are removed before the text goes to the in-game console.