Refresh variables, functions, conditionals, loops, tables, and events — the parts of the language you'll use all course long.
You've now got the whole Luau toolbox: that remember, that repeat jobs, conditionals that decide, that repeat, that hold many things, timing, and that answer the world. This lesson packs it all into one quick lap — because the next section, data, leans on every single piece.
A is a named box. Declare it with local, read it, and change it — coins = coins + 1 reads the box, adds one, and stores the result back.
What is wrong with this line: if coins = 5 then
A wraps a job: function addCoins(amount) ... end, then you call it with addCoins(5). Defining does nothing until you call. A conditional makes a choice — Luau checks the if, then each elseif, and only if none matched does else run.
What does defining a function do by itself?
while true do ... task.wait(1) end repeats forever with a beat. A for counts for a known number of times. are boxes that hold many values, and you pull them out by position. task.wait pauses; task.delay schedules and moves on.
You don't watch for things; you listen. part.Touched:Connect(function(hit) ... end) signs up a callback that the engine runs whenever the fires. :Connect runs nothing now — it registers the for later.
What does :Connect do?
, , conditionals, , , timing, — that's the whole language core. The next section plugs it into the real world: the , their data, and the trust rules around it.