
At some point, a child who loves Roblox stops talking only about the games they play and starts talking about a game they're making. Soon after that, a new word turns up at the dinner table: Luau. "I fixed my script." "My Luau won't run." "I need to learn Luau properly."
If you've nodded along without being quite sure what they mean, this guide is for you. Here's what Luau is, what it looks like on screen, and whether it's worth your child's time.
Quick Answer: Luau is the programming language used to script every Roblox game. Roblox built it from Lua, a language that has been used in professional games for decades, and added features like type checking and better performance. Kids type it out line by line in Roblox Studio, and it teaches the same core ideas as any language: variables, events, conditions, loops and functions. For children aged about 7 to 12, Roblox coding classes for kids are one of the most motivating ways to learn it.
What Is Luau?
Every Roblox game is made of two things: the world you can see (the parts, terrain and characters) and the code that makes the world do something. Luau is the language that code is written in.
It started life as Lua, a small, fast scripting language created in Brazil in the 1990s and used in games ever since. Roblox used Lua for years, then gradually extended it into its own version, which it named Luau and later made open source. Today, when a door opens in a Roblox game, a coin adds to your score or a lava floor sends you back to the start, there's Luau behind it.
The important thing for parents is this: Luau is typed, not dragged. There are no blocks to snap together. Your child writes real code, spells things exactly, and finds out quickly when they've made a mistake. That makes it a genuine programming language, not a simplified game toy.
Where Does Luau Live in Roblox Studio?
Kids write Luau inside Roblox Studio, the free app for building Roblox games on Windows and Mac. A script is attached to something in the game world, such as a part, a character or the game itself. When the game runs, the script runs with it.
That connection between code and world is the magic. A child writes four lines, presses Play, walks their character onto a block, and watches the thing they described actually happen. Few beginner exercises give that kind of instant, visible feedback.
What Does Luau Code Look Like?
Here are three short scripts of the kind a beginner writes in their first few weeks. You don't need to follow every word, but you'll notice how readable they are.
1. Events: a lava floor
local lava = script.Parent
lava.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end)
In plain English: "When something touches this lava, check whether it's a player. If it is, knock their health down to zero." That's an event (something happens, so code runs) and a condition (only if it's a player). Those two ideas power almost every game ever made.
2. Variables: a coin counter
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Value = 0
coins.Parent = leaderstats
end)
Every time a player joins, this script gives them a score called Coins, starting at zero, which appears on the leaderboard in the corner of the screen. That's a variable: a named box that holds a value that can change. Add another script that increases Coins when a coin is touched, and your child has built the core of a collecting game.
3. Loops: a flashing block
local block = script.Parent
while true do
block.Color = Color3.fromRGB(255, 0, 0)
task.wait(1)
block.Color = Color3.fromRGB(0, 0, 255)
task.wait(1)
end
This turns a block red, waits a second, turns it blue, waits a second, and repeats forever. That's a loop. Swap the colours for positions and the same idea gives you a moving platform, one of the first obstacles every child wants in their obby.
Lua vs Luau: What's the Difference?
Parents who search for help sometimes find Lua tutorials and wonder whether they're the same thing. Mostly, yes. Luau understands almost all ordinary Lua code, so the basics carry straight across. What Roblox added on top includes:
- Type checking: an optional way to label what kind of value a variable should hold, such as
local coins: number = 0. Studio can then warn you before the game even runs, which is how professional programmers catch mistakes too. - Handy shortcuts: such as
coins += 1instead ofcoins = coins + 1, and acontinuekeyword for skipping ahead in a loop. - Speed and safety: Luau is tuned to run fast inside Roblox, and it limits what a script can do, so a game can't reach into the player's computer.
For a beginner, the difference barely matters. What matters is that the habits they build in Luau, reading errors, naming things clearly and testing one change at a time, are the habits of any good programmer.
Is Luau a Good First Programming Language?
For most children aged 7 to 12 who already love Roblox, I think it's one of the best. Here's the honest picture.
What works well:
- The motivation is built in. Kids aren't printing "Hello, world" for a teacher. They're building something they and their friends will actually play, which carries them through the frustrating early weeks.
- The words are readable. Luau uses plain words like
if,then,whileandendrather than lots of symbols, so a script reads almost like a sentence. - Mistakes are visible. When a script is wrong, the door doesn't open. Seeing the bug in the game makes debugging feel like solving a puzzle.
What to watch for:
- Copy-paste habits. Roblox has a huge library of free models and scripts. It's easy for a child to "build" a game by dropping in other people's code without understanding any of it. Real learning happens when they write the script themselves.
- Roblox-specific parts. Things like
Humanoidandleaderstatsonly exist in Roblox. The ideas transfer everywhere; those exact names don't. - Counting from 1. Lists in Luau start at position 1, while Python and most other languages start at 0. It's a small adjustment, but worth knowing about when your child moves on.
From Luau to Python
The best news about Luau is where it leads. Here's the same decision written in both languages:
-- Luau
if coins >= 10 then
print("You unlocked the door!")
end
# Python
if coins >= 10:
print("You unlocked the door!")
The logic is identical. Only the punctuation changes: Luau closes the block with end, Python uses indentation and a colon. A child who is comfortable with variables, events, conditions and loops in Luau usually finds Python feels like learning a new accent, not a new language.
That's why we see Roblox as a starting point, not a dead end. From around 12, kids can move on to Python or to 2D game development with Construct 3. If your child has been using Scratch and you're wondering where Luau fits, our guide to Scratch vs Python covers how the stages connect.
How Can My Child Learn Luau?
There are two realistic routes.
On their own. Roblox Studio is free, and Roblox publishes its own documentation and tutorials for creators. Self-motivated kids, especially older ones who are comfortable reading technical instructions, can make real progress this way. The common sticking point is the gap between following a tutorial and building their own idea, which is where many children drift back to copying free models.
With a class. A good class closes that gap by having kids write every script themselves, explaining why it works, and helping them debug when it doesn't, rather than fixing it for them. If you're comparing options, our parent's guide to Roblox coding for kids lists the questions worth asking before you book.
Learning Luau at DotCode Campus
In our Roblox coding classes for kids, children aged 7 to 12 learn Roblox Studio and Luau over 10 lessons, in live groups of up to 6. They start with world building, write their first scripts, add scoring and leaderboards, and finish by publishing a game of their own that anyone can play with a link.
Classes run in person at our Jurong East studio or live online from anywhere in Singapore, and you can try a lesson before committing. Book a free trial class and see whether your child enjoys writing the code as much as they enjoy playing the games.



