Library

globals

globals

Globals registered directly on the Luau environment table. Holds top-level identifiers that should be reachable without a namespace prefix.

Functions

3

#globals.print(...: any) → ()

since 0.9.1-dev

Prints its arguments to the VM output log. Multiple arguments are separated by tabs. Scalars are stringified the same way tostring would do it; tables are pretty-printed recursively (Roblox Studio style) with cycle detection when the core.luau.pretty_print setting is enabled. Tables with an __iter metamethod are walked via __iter so their actual contents are emitted. With the setting off, behaves like the classic Luau print (each argument stringified via tostring).

Parameters

...any

The values to print.

#globals.warn(...: any) → ()

since 0.9.1-dev

Prints its arguments to the VM output log as a warning. Behaves exactly like print (including the core.luau.pretty_print setting toggle), but the message is tagged at the warning level so it stands out.

Parameters

...any

The values to warn with.

#globals.typeof(object: any) → string

since 1.6.9-alpha

Similar to type, but also identifies custom objects like Vector2, Vector3, CFrame, etc.

Parameters

objectany

The value for which to identify its type