2 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Luau

Luau is the scripting language creators use in Roblox Studio. It is a fast, small, safe, gradually typed embeddable scripting language derived from Lua 5.1.

Note

Contributing your Luau scripts for AI training can help enhance Luau-focused AI tools in Studio. For more information, see Empower Luau creation.

Support in Studio

The Script Editor in Studio supports Luau with autocompletion, syntax highlighting, static linting, type checking, and script analysis. It also shows documentation and function signatures for members of the Roblox Engine API.

Types

Luau includes the following data types:

Luau is dynamically typed by default. Variables, function parameters, and return values can be any data type. This helps you write code faster because you don't need to provide types for each piece of data. You can still declare explicit types for variables in Luau and enable strict type checking to make type issues obvious and easy to locate.

Data structures

You can also implement the following data structures using primitive data types:

Features

In Luau, variables and functions can have global and local scope within a script. Luau has logical, relational, and compound assignment operators. You can use control structures and functions to control when Luau executes code. Many operators and variable assignments perform type coercion to change values to the types that Luau expects.