Module 2

Luau

The language: values and tables, modules, events and tasks, objects and types.

Start lesson 1: Luau basics, part 1: Luau-specific text, decisions and pcall
Lessons
6
Time
7.5 hours
Practice
39 code cells, 51 questions
You finish with
Coins that count m03-coins-count
0 of 6 finished

Lessons

  1. 2ModuleScripts and requireLearn how Roblox ModuleScripts and require work, including the require cache, per-side copies and cyclic require errors, by reading how Beacon Yard's server boots its services.Concept, 70 min
  2. 3Events, signals and the task libraryLearn Roblox events and the task library in Luau. Connect and Disconnect, closures, task.wait, task.spawn, task.defer, task.delay, Heartbeat and deferred events, run in the browser and traced through Beacon Yard's coin respawn.Concept, 80 min
  3. 4Debugging basics: Output, stack traces and breakpointsDebug Luau scripts in Roblox Studio. Use print, warn and error, read Output and stack traces, and pause Beacon Yard with breakpoints, Watch, Call Stack and stepping.Tool, 20 min
  4. 5Objects in Luau: metatables, classes, compositionLearn object-oriented programming in Luau for Roblox. The colon and self, metatables and __index, classes, inheritance, composition, and when Roblox games should not use classes at all, with runnable cells and Beacon Yard's drone.Concept, 75 min
  5. 6Types: strict mode, the new type solver, genericsLearn Luau's type system for Roblox. Strict mode, annotations, singleton unions, unknown and refinement, typeof, generics, type packs, the new type solver's general release and luau-lsp analyze in CI, with Beacon Yard's Types.luau.Tool, 75 min

The game at the end of this module