Menu
Coddy logo textTech

What Is Luau?

Part of the Introduction To Luau section of Coddy's Lua journey — lesson 1 of 73.

Luau is a programming language created at Roblox that builds on the Lua you already know by adding gradual static types. Think of it as Lua with an extra layer of safety and tooling — it powers millions of Roblox experiences and has been open source since 2021.

The key idea is that Luau is a superset of Lua 5.1. Any valid Lua 5.1 code is also valid Luau code: you can take a script you wrote in the previous sections and run it as Luau, unchanged.

What Luau adds on top is type annotations. An annotation declares what kind of data a variable should hold — a string, a number, a boolean, a table — so mistakes can be caught before your code even runs:

-- Lua (also valid Luau)
local message = "Hello World"

-- Luau with a type annotation
local message: string = "Hello World"

The word gradual matters: annotations are optional. You can type one variable, one function, or a whole file — untyped Lua-style code keeps working while you add types at your own pace.

In return you get better editor tooling, more readable code, and protection against the kind of bugs that plain Lua only reveals while the program is running.

Try it yourself

This lesson doesn't include a code challenge.

quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Introduction To Luau