Roblox Globals

Mostrar obsoleto

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.

Resumen

Propiedades

  • 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.

Funciones

elapsedTime

Devuelve

PluginManager

tick

Devuelve

time

Devuelve

typeof

Parámetros

object: Variant

Devuelve

UserSettings

Devuelve

version

Devuelve

warn

void

Parámetros

params: Tuple

Devuelve

void

Propiedades

Enum

A reference to the Enums data type, which stores all of the available enums that can be used on Roblox.

A reference to the DataModel, which is the root Instance of Roblox's parent/child hierarchy.

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

shared

A table that is shared across all scripts that share the same execution context level. This serves the exact same purpose as _G.

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.

workspace

A reference to the Workspace service, which contains all of the physical components of a Roblox world.