Skip to content
BENIBIX Learn

Luau

Development🎮 Game DevelopmentGame Engines

Also known as Luau Language, Roblox Lua

The language Roblox games are scripted in. It grew out of 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.

Example

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

Why it matters

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

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 code

lua
part.Touched:Connect(function(hit)
    print(hit.Name)
end)
A Luau script that prints the name of whatever touches the part.
Luau is the language in the Roblox Studio row.

Common mistake

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

Key takeaways

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

Compare