Journey
Learn Lua
Learn the Lua programming language with a free, interactive online course. Master Lua syntax, tables, functions, metatables, and the foundations you need for Roblox scripting and game-engine work — through hands-on coding exercises, AI hints, and a free certificate when you finish.
49,057+ codders enrolled
This journey includes
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
3 sections214 lessons167 challenges1,071 quiz questions01Section 1
Fundamentals
The first section in Lua for absolute beginners.START LEARNINGIntroduction
3 lessons216- 01The LanguageChallenge
- 02Hello World!ChallengeQuizAudio
- 03CommentsQuizAudio
Variables and Data Types
8 lessons754- 01What is a Variable?ChallengeQuizAudio
- 02NumbersChallengeQuizAudio
- 03StringsChallengeQuizAudio
- 04BooleansChallengeQuizAudio
- 05The Value 'nil'ChallengeQuizAudio
- 06The type() FunctionChallengeQuizAudio
- 07Naming ConventionsQuizAudio
- 08Recap - Character ProfileChallenge
Operators 1 Arithmetic & Conc
6 lessons636- 01Arithmetic OperatorsChallengeQuizAudio
- 02Modulo OperatorChallengeQuizAudio
- 03Exponentiation OperatorChallengeQuizAudio
- 04String ConcatenationChallengeQuizAudio
- 05Operator PrecedenceChallengeQuizAudio
- 06Recap - Simple CalculationsChallenge
Operators 2 Relational & Logic
8 lessons651- 01Equality OperatorsChallengeQuizAudio
- 02Relational OperatorsChallengeQuizAudio
- 03The 'and' OperatorChallengeQuizAudio
- 04The 'or' OperatorChallengeQuizAudio
- 05The 'not' OperatorChallengeQuizAudio
- 06Short-Circuit EvaluationQuizAudio
- 07Truthy and Falsy ValuesQuizAudio
- 08Recap - Simple LogicChallenge
Basic Output
9 lessons954- 01Printing LiteralsChallengeQuizAudio
- 02Printing VariablesChallengeQuizAudio
- 03Printing Multiple ValuesChallengeQuizAudio
- 04Combining Strings & VariablesChallengeQuizAudio
- 05The tostring() FunctionChallengeQuizAudio
- 06InputChallengeQuizAudio
- 07CastChallengeQuizAudio
- 08Recap - Status ReportChallenge
- 09Recap - Till 120Challenge
Project: Character Stats Disp
Project5 lessons1- 01Welcome MessageChallenge
- 02Declare Character StatsProject
- 03Display Basic StatsProject
- 04Add a Boolean FlagProject
- 05Final SummaryProject
Basic Conditional Logic
4 lessons423- 01The if-then StatementChallengeQuizAudio
- 02The if-then-else StatementChallengeQuizAudio
- 03The elseif StatementChallengeQuizAudio
- 04Recap - Treasure ChestChallenge
String Manipulation Basics
6 lessons638- 01string.len()ChallengeQuizAudio
- 02string.upper & string.lowerChallengeQuizAudio
- 03string.sub()ChallengeQuizAudio
- 04string.rep()ChallengeQuizAudio
- 05string.find()ChallengeQuizAudio
- 06Recap - Format UsernameChallenge
Functions Basics
6 lessons636- 01Declaring a FunctionChallengeQuizAudio
- 02Calling a FunctionChallengeQuizAudio
- 03Functions with ParametersChallengeQuizAudio
- 04Functions with Multiple ParamsChallengeQuizAudio
- 05The 'return' StatementChallengeQuizAudio
- 06Recap - Area CalculatorChallenge
Tables Part 1: List-Style
8 lessons752- 01What is a Table?QuizAudio
- 02Creating a TableChallengeQuizAudio
- 03Accessing Elements by IndexChallengeQuizAudio
- 04Modifying Elements by IndexChallengeQuizAudio
- 05The Length Operator '#'ChallengeQuizAudio
- 06table.insert()ChallengeQuizAudio
- 07table.remove()ChallengeQuizAudio
- 08Recap - Manage Party MembersChallenge
Tables 2: Dictionary-Style
7 lessons648- 01Key-Value PairsQuizAudio
- 02Creating Dictionary-Style TablChallengeQuizAudio
- 03Accessing - Bracket NotationChallengeQuizAudio
- 04Accessing with Dot NotationChallengeQuizAudio
- 05Adding and Modifying PairsChallengeQuizAudio
- 06Removing Pairs with nilChallengeQuizAudio
- 07Recap - Item PropertiesChallenge
Loops Basics
6 lessons636- 01The while LoopChallengeQuizAudio
- 02The repeat-until LoopChallengeQuizAudio
- 03The Numeric for LoopChallengeQuizAudio
- 04for Loop with a StepChallengeQuizAudio
- 05The 'break' StatementChallengeQuizAudio
- 06Recap - CountdownChallenge
Project: Simple Potion Shop
Project6 lessons1- 01Project SetupChallenge
- 02Adding a PotionProject
- 03Displaying the InventoryProject
- 04Calculating Total Stock ValueProject
- 05Finding a Specific PotionProject
- 06Selling a PotionProject
Variable Scope
5 lessons330- 01Global VariablesQuizAudio
- 02Local VariablesChallengeQuizAudio
- 03Why Use Local Variables?QuizAudio
- 04Scope and BlocksChallengeQuizAudio
- 05Recap - Scope PuzzleChallenge
Final Challenges
3 lessons3- 01Recap - Player TurnChallenge
- 02Recap - Simple DatabaseChallenge
- 03Recap - Sum of Even NumbersChallenge
02Section 2
Logic & Flow
Develop problem-solving skills and create dynamic, interactive programsSTART LEARNINGAdvanced Table Iteration
4 lessons423- 01Iterating with pairs()ChallengeQuiz
- 02Iterating with ipairs()ChallengeQuiz
- 03pairs() vs. ipairs()ChallengeQuiz
- 04Recap - Character SheetChallenge
More Table Library Functions
5 lessons430- 01table.concat()ChallengeQuiz
- 02table construction & unpack()ChallengeQuiz
- 03table.sort()ChallengeQuiz
- 04Custom Sorting with FunctionsQuiz
- 05Recap - High Score BoardChallenge
Advanced Function Concepts
6 lessons539- 01Returning Multiple ValuesQuiz
- 02Variadic Functions (...)ChallengeQuiz
- 03Functions First-Class ValuesChallengeQuiz
- 04Anonymous FunctionsChallengeQuiz
- 05What is a Closure?ChallengeQuiz
- 06Recap - Simple Event HandlerChallenge
Introduction to Metatables
8 lessons757- 01What is a Metatable?Quiz
- 02setmetatable & getmetatableChallengeQuiz
- 03The __index MetamethodChallengeQuiz
- 04The __newindex MetamethodChallengeQuiz
- 05The __tostring MetamethodChallengeQuiz
- 06Arithmetic Metamethods Part 1ChallengeQuiz
- 07Arithmetic Metamethods Part 2ChallengeQuiz
- 08Recap - Read-Only TableChallenge
Project: Text Adventure Engine
Project8 lessons1- 01Project Setup: The RoomChallenge
- 02Linking RoomsProject
- 03Player StateProject
- 04The Game LoopProject
- 05Handling User InputProject
- 06Moving the PlayerProject
- 07Handling Invalid MovesProject
- 08Displaying ExitsProject
Error Handling
3 lessons216- 01The error() FunctionQuiz
- 02Protected Calls with pcall()ChallengeQuiz
- 03Recap - Safe DivisionChallenge
Advanced String Manipulation
6 lessons641- 01string.gsub() for SubstitutionChallengeQuiz
- 02Intro to String PatternsChallengeQuiz
- 03string.find()ChallengeQuiz
- 04string.match()ChallengeQuiz
- 05Iterating with string.gmatch()ChallengeQuiz
- 06Recap - Log File ParserChallenge
Project: Contact List
Project7 lessons1- 01Project SetupChallenge
- 02The Main LoopProject
- 03Adding a ContactProject
- 04Listing All ContactsProject
- 05Searching for a ContactProject
- 06Deleting a ContactProject
- 07Handling Invalid InputProject
Coroutines for Beginners
7 lessons638- 01What is a Coroutine?Quiz
- 02coroutine create & resumeChallengeQuiz
- 03Pausing with coroutine.yield()ChallengeQuiz
- 04resume & yieldChallengeQuiz
- 05Checking Coroutine StatusChallengeQuiz
- 06Recap - Number GeneratorChallenge
- 07Recap - Vector MathChallenge
03Section 3
Object Oriented Programming
Discover how to organize code with classes, objects, and reusable structuresSTART LEARNINGThe 'Self' Concept
5 lessons532- 01Tables with FunctionsChallengeQuiz
- 02Explicit 'self'ChallengeQuiz
- 03The Colon SyntaxChallengeQuiz
- 04Dot vs ColonChallengeQuiz
- 05Recap - Moving PointChallenge
Class Prototype Pattern
6 lessons641- 01The Prototype ConceptChallengeQuiz
- 02Linking with __indexChallengeQuiz
- 03The :new() ConstructorChallengeQuiz
- 04Initializing AttributesChallengeQuiz
- 05Independent InstancesChallengeQuiz
- 06Recap - Car FactoryChallenge
Object State and Behavior
7 lessons748- 01Instance VariablesChallengeQuiz
- 02Getter MethodsChallengeQuiz
- 03Setter MethodsChallengeQuiz
- 04Calculated PropertiesChallengeQuiz
- 05Formatting StringsChallengeQuiz
- 06Equality ChecksChallengeQuiz
- 07Recap - Student GradeChallenge
Project: Digital Bank
Project7 lessons1- 01Project SetupChallenge
- 02Deposit MethodProject
- 03Withdraw MethodProject
- 04Get BalanceProject
- 05Account InfoProject
- 06Transfer FundsProject
- 07Final Bank TestProject
Operator Overloading in OOP
5 lessons531- 01Adding ObjectsChallengeQuiz
- 02Subtracting ObjectsChallengeQuiz
- 03Concatenating ObjectsChallengeQuiz
- 04Comparing Objects (<, >)ChallengeQuiz
- 05Recap - Wallet MathChallenge
Inheritance Basics
6 lessons643- 01The Inheritance SetupChallengeQuiz
- 02Inheriting MethodsChallengeQuiz
- 03Extending the ConstructorChallengeQuiz
- 04Adding Child MethodsChallengeQuiz
- 05Shared vs UniqueChallengeQuiz
- 06Recap - Shape HierarchyChallenge
Polymorphism & Overriding
6 lessons640- 01Overriding MethodsChallengeQuiz
- 02Calling Parent MethodsChallengeQuiz
- 03Duck TypingChallengeQuiz
- 04Common InterfaceChallengeQuiz
- 05Checking TypeChallengeQuiz
- 06Recap - Employee RolesChallenge
Encapsulation
6 lessons644- 01Naming ConventionsChallengeQuiz
- 02Closures for PrivacyChallengeQuiz
- 03Access via ClosuresChallengeQuiz
- 04Read-Only TablesChallengeQuiz
- 05Validation LogicChallengeQuiz
- 06Recap - Secure VaultChallenge
Composition & Mixins
6 lessons642- 01Has-A RelationshipChallengeQuiz
- 02DelegationChallengeQuiz
- 03Simple MixinsChallengeQuiz
- 04Applying Multiple MixinsChallengeQuiz
- 05Mixins vs InheritanceChallengeQuiz
- 06Recap - Robot AssemblyChallenge
Project: Shape Manager
Project7 lessons1- 01Project SetupChallenge
- 02Rectangle ClassProject
- 03Circle ClassProject
- 04Perimeter MethodProject
- 05Shape CollectionProject
- 06Total AreaProject
- 07Filter ShapesProject
Design Patterns (Lite)
5 lessons532- 01Factory FunctionsChallengeQuiz
- 02Singleton TableChallengeQuiz
- 03Iterator PatternChallengeQuiz
- 04Observer (Listener)ChallengeQuiz
- 05Recap - Logger FactoryChallenge
Final Challenges
4 lessons4- 01Recap - Inventory SystemChallenge
- 02Recap - User ManagerChallenge
- 03Recap - Score TrackerChallenge
- 04Final OOP CheckChallenge
Why learn Lua with Coddy
- Run real Lua code in your browser — no Lua interpreter to install, no toolchain setup. Each lesson runs your Lua script server-side and shows the output instantly.
- Coverage of Lua as it's actually used: variables, control flow, functions, tables (Lua's one true data structure), string manipulation, metatables and OOP patterns, error handling — the Lua foundations you need for Roblox, Love2D, or embedded scripting.
- AI-assisted hints help you debug Lua scripts and read errors without spoiling the answer, so common stumbles like nil indexing and 1-based arrays become learning moments.
- Free Lua certificate when you finish the course — a credible signal alongside Roblox games, mods, or embedded scripting projects you've built.
Frequently asked questions about learning Lua
What is Lua used for?
Lua is mainly used as an embedded scripting language inside larger applications — game engines especially. Roblox scripting (Luau is a Roblox-specific dialect of Lua), Love2D, World of Warcraft addons, Defold, and Garry's Mod all use Lua. Outside games, Lua is also used for configuration, automation, and embedded systems.
Is Lua easy to learn?
Lua is one of the smaller, simpler programming languages — the entire reference manual fits in a short PDF, and there's basically one main data structure (the table). Most beginners on Coddy reach their first working Lua program within the first hour. The trickier parts (metatables, closures, coroutines) come later and are introduced gradually.
Should I learn Lua for Roblox?
Yes — Lua (specifically the Luau dialect Roblox uses) is the only scripting language for Roblox games. Coddy's Lua course covers the same core language Luau is based on (variables, tables, functions, metatables, OOP patterns), so finishing it gives you a real head start on Roblox scripting.
How long does it take to learn Lua?
Lua basics — variables, conditionals, loops, functions, tables — take one to two weeks of daily practice. Becoming comfortable with metatables, closures, and OOP-in-Lua patterns usually takes another two to four weeks. From there, applying Lua inside Roblox or another game engine is its own learning curve on top of the language.
Can I learn Lua online for free?
Yes. Coddy's interactive Lua course is free — lessons, coding exercises, quizzes, and a certificate. Lua runs server-side, so you don't need to install Lua or any game engine locally to start writing code.
Do I get a certificate after the Lua course?
Yes — when you finish Coddy's Lua course you receive a free certificate of completion that you can add to your resume or share on LinkedIn alongside any Roblox games, mods, or scripting projects you've built.