I want to learn programming in Lua, but I feel completely lost once I get beyond basic variables. Functions, loops, and working with data are especially difficult, and I still don't have a clear mental model of how programming languages or computers work. The syntax feels like an ancient cipher, and I'm starting to wonder whether I'm learning the wrong way or simply lack the ability to understand it. I've been reading documentation, asking focused questions, and looking for tutorials, but much of the documentation feels padded and many videos are either full of filler or difficult to stay engaged with. I recently started to understand Lua loops a little better, so I'm hoping for advice on how to build a stronger foundation and find effective learning resources.
4 Answers
You don’t necessarily need to switch languages, but Python is another beginner-friendly option with lots of clear learning material. More important than the language is choosing one structured course and completing small exercises consistently instead of jumping between random videos and references.
Scratch or another block-based programming tool can be useful if the syntax itself is getting in the way. It lets you practice conditions, loops, variables, and functions visually. You can then recreate the same small projects in Lua once the ideas feel familiar.
Try to turn every question into a tiny experiment. Instead of reading about loops for an hour, write a loop that prints a few values, change one part, and observe what happens. Do the same with functions: write one that takes a value, changes it, and returns a result. Small programs that solve one concrete problem are usually more effective than trying to understand the entire language at once.
It may help to learn the “why” behind the tools instead of only memorizing syntax. Get a basic understanding of what computers do, how programs are executed, and what programming languages are meant to represent. Once variables, control flow, functions, and data structures have a purpose in your head, the syntax becomes much less mysterious. A beginner-friendly computer science course or visual lesson series could help before diving too deeply into Lua.
I had a similar experience. Learning a little about computer architecture and even low-level programming helped me understand what high-level languages were hiding. Before that, I kept getting stuck asking what each feature actually was and why it existed.

Documentation is often better as a reference than as a first course. Use a structured beginner tutorial, then return to the documentation when you need to check a particular function or rule.