Functions

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

circle-info

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 reprarrow-up-right.

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 reprarrow-up-right.

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

Throws an error, if the format printing setting is enabled then it will format the message with reprarrow-up-right. 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 printidentityarrow-up-right on Roblox but will always print identity 2, and outputs into the script builder output.

circle-exclamation

Exactly the same as Roblox's requirearrow-up-right function, but is blocked from people in place 1 (outside of VIP servers) that don't have place 1 require permissions. This is because this function can very easily escape the sandbox.

circle-info

If you want to use mesh parts or not have to use model to script in place 1, then check out LoadAssets.

LoadLibrary

A reimplementation of Roblox's LoadLibrary feature which was removedarrow-up-right.

chevron-rightList of librarieshashtag
  • RbxGui

  • RbxStamper

  • RbxUtility

triangle-exclamation

LoadAssets

Has almost the exact same functionality as require. But can only have asset id's as the target, and does some security checks to prevent people from running untrusted code outside the sandbox. This is used to load user made assets into the game (even meshparts).

circle-info

Credits to Raymondarrow-up-right for the idea.

chevron-rightHow to usehashtag

First of all you need to get the Model from Roblox herearrow-up-right, and then add it in studio. After that you can insert in all assets that you want to be able to use ingame. And then publish the ModuleScript (remember to enable "Distribute on Marketplace"), then copy the asset id.

(Remember that modifying the ModuleScript's source or adding any blocked instances will cause it to be blocked in-game.)

After that you can call LoadAssets() with the asset id you copied and then use :Get() with the name of the asset you want.

chevron-rightBlocked instanceshashtag
  • Script

  • LocalScript

  • ModuleScript

  • CoreScript

  • PackageLink

  • AdPortal

  • FloorWire

  • SkateboardPlatform

  • DynamicImage (might change)

chevron-rightExampleshashtag

Loads a noob mesh into the game near spawn.

Loads a mesh of Roblox and Builderman into the game near the spawn.

Prints a list of drinks to the player's output, and allows them to get them by saying ",drink " followed by the drink name.

NewScript

Creates and returns a new Scriptarrow-up-right with the specified source under the specified parent, with optional run arguments.

circle-info

If no parent argument is specified then it will default to Workspacearrow-up-right.

chevron-rightExampleshashtag

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 LocalScriptarrow-up-right with the specified source under the specified parent, with optional run arguments.

circle-info

If no parent argument is specified then it will default to the script owner's PlayerGuiarrow-up-right.

chevron-rightExampleshashtag

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