# Luau

> The language Roblox games are scripted in. It grew out of Lua.

**Field:** Software Development  
**Category:** Game Development  
**Also known as:** Luau Language, Roblox Lua

## Think of it like

Think of it like a kids' bike with gears added. It is easy to ride, and it can go fast.

## Definition

Luau is the language used to script games in Roblox Studio. It grew out of Lua 5.1, a small and simple language. Luau adds types you can use if you want them, which help catch mistakes. It is built to be small, fast and safe. Scripts react to events, like a player touching a part.

## Example

Emma writes a Luau script for a lava block. A player who touches it goes back to the start.

## Example code

```lua
part.Touched:Connect(function(hit)
    print(hit.Name)
end)
```

A Luau script that prints the name of whatever touches the part.

## Why it matters

Every Roblox game runs on it. It is a gentle first language with real results.

## Common mistake

Copying old Lua guides word for word. Luau changes some things and adds types.

## Three principles

- **Grew out of Lua.** It started from Lua 5.1.
- **Types if you want.** Add types to catch mistakes early.
- **Events.** Scripts react when something happens.

## Related terms

- [Roblox Studio](https://learn.benibix.com/term/development/roblox-studio)
- [Python](https://learn.benibix.com/term/development/python)
- [JavaScript](https://learn.benibix.com/term/development/javascript)
- [Game Engine](https://learn.benibix.com/term/development/game-engine)
- [Lua](https://learn.benibix.com/term/development/lua)

## Told apart from

- [Lua vs Luau](https://learn.benibix.com/compare/lua-vs-luau): People think Luau is just another name for Lua, and it is not. Luau is based on Lua 5.1, and much simple Lua code runs in it unchanged. But Luau is made for Roblox games. It adds types you can choose to use, and it shuts off parts of Lua that would be unsafe in a game, such as reading files. A Lua script for another app may not run in Roblox.

![A table of four game engines. Unity is scripted in C# and known for mobile and indie games in 2D and 3D. Unreal Engine is scripted in C++ and Blueprints and known for big 3D games with lifelike pictures. Godot is scripted in GDScript or C# and is free and open source under the MIT licence. Roblox Studio, lit up, is scripted in Luau and makes games that live inside Roblox.](https://learn.benibix.com/diagrams/dev2-game-engines.svg)

---

Source: https://learn.benibix.com/term/development/luau
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
