Roblox Globals
Roblox has several unique built-in functions and variables in its Lua implementation. These are only found on Roblox and are not packaged by default with Lua.
Summary
Functions
Properties
Contains all Enum objects.
Refers to the DataModel singleton, the root instance of a place's hierarchy.
Refers to a Plugin singleton when the code is run in the context of a Studio plugin.
A table shared between all code running at the same execution context level.
A reference to the LuaSourceContainer object (Script, LocalScript, or ModuleScript) that is executing this code.
A reference to the Workspace service, which contains all of the physical components of a place.
Functions
Properties
Enum
A reference to the Enums data type, which stores all of the available enums that can be used on Roblox.
plugin
A reference to the Plugin object that represents the plugin being run from this Script. This reference exists only in the context where a script is executed as a plugin and is not passed to ModuleScripts within the plugin. To use this reference in a ModuleScript, you must explicitly pass it.
assert(plugin, "This script must be run as a plugin!")-- Code beyond this point will execute only if the script is run as a plugin
script
A reference to the script object that is executing the code you are writing. It can be either a Script, a LocalScript, or a ModuleScript. This variable is not available when executing code from Roblox Studio's command bar.