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.

概要

プロパティ

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

関数

elapsedTime

戻り値

gcinfo

戻り値

PluginManager

戻り値

require

Variant

パラメータ

module: ModuleScript

戻り値

Variant

tick

戻り値

time

戻り値

typeof

パラメータ

object: Variant

戻り値

UserSettings

戻り値

version

戻り値

warn

void

パラメータ

params: Tuple

戻り値

void

プロパティ

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 ran from this Script. This reference only exists in the context where a script is executed 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 (and sometimes a Class.CoreScript). 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.