Lua Globals

Show Deprecated

The following is a list of functions and variables that are native to Lua. These functions can be used in a standard installation of Lua 5.1.4, though there are some differences in how some of these work on Roblox.

Summary

Functions

Properties

  • A table that is shared between all scripts of the same context level.

  • A global variable that holds a string containing the current interpreter version.

Functions

assert

Variant

Parameters

value: Variant
errorMessage: string
Default Value: assertion failed!

Returns

Variant

error

void

Parameters

message: string
level: number
Default Value: 1

Returns

void

gcinfo

Returns

getmetatable

Variant

Parameters

t: Variant

Returns

Variant

ipairs

Parameters

loadstring

Variant

Parameters

contents: string
chunkname: string

Returns

Variant

newproxy

Parameters

addMetatable: bool
Default Value: false

Returns

Parameters

pcall

Parameters

func: function
args: Tuple

Returns

Variant

print

void

Parameters

params: Tuple

Returns

void

rawequal

Parameters

v1: Variant
v2: Variant

Returns

rawget

Variant

Parameters

index: Variant

Returns

Variant

rawlen

Parameters

Returns

rawset

Parameters

index: Variant
value: Variant

Returns

require

Variant

Parameters

module: ModuleScript

Returns

Variant

select

Parameters

index: Variant
args: Tuple

Returns

setmetatable

Parameters

newMeta: Variant

Returns

tonumber

Variant

Parameters

arg: Variant
base: number
Default Value: 10

Returns

Variant

tostring

Parameters

e: Variant

Returns

type

Parameters

v: Variant

Returns

unpack

Variant

Parameters

list: table
Default Value: 1
Default Value: #list

Returns

Variant

xpcall

Parameters

args: Tuple

Returns

Variant

Properties

A table that is shared between all scripts of the same context level.

_VERSION

A global variable (not a function) that holds a string containing the current interpreter version.