Functions

This page lists all the global functions that you can use with localscripts in the script builder.

Any global function that are not listed here that is otherwise normally a part of Roblox should keep their vanilla behavior.

print(...: any): void

Prints into the script builder output instead of the Roblox one. If the format printing setting is enabled then it will format the message with repr.

warn(...: any): void

Warns into the script builder output instead of the Roblox one. If the format printing setting is enabled then it will format the message with repr.

error(message: any, level: number?): void

Throws an error, if the format printing setting is enabled then it will format the message with repr. Script errors are automatically caught by the script builder and outputted into your output.

printf

printf(...: any): void

Prints into the script builder output with richtext enabled, ignoring the format printing setting. Useful if you want to print information to the user into the output.

warnf

Warns into the script builder output with richtext enabled, ignoring the format printing setting. Useful if you want to warn information to the user into the output.

Exactly like printidentity on Roblox but will always print identity 2, and outputs into the script builder output.

This function is disabled on client.

A reimplementation of Roblox's loadstring function on client.

LoadLibrary

A reimplementation of Roblox's LoadLibrary feature which was removed.

List of libraries
  • RbxGui

  • RbxStamper

  • RbxUtility

NewScript

Creates and returns a new Script with the specified source under the specified parent, with optional run arguments.

If no parent argument is specified then it will default to Workspace.

Examples

Creates a new script in workspace that prints "Hello World! I'm in " followed by its full name.

Creates a new script in workspace, and prints the 3 values it's given.

NS

Alias for NewScript.

NewLocalScript

Creates and returns a new LocalScript with the specified source under the specified parent, with optional run arguments.

If no parent argument is specified then it will default to the script owner's PlayerGui.

Examples

Creates a new local script in your player gui that prints "Hello World! I'm in " follwed by its full name.

Creates a new local script in your PlayerGui, and prints the 3 values it's given.

Creates a new local script in your player gui to send your key inputs to the server.

NLS

Alias for NewLocalScript.

Last updated