Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How can I make learning Lua less overwhelming?

Asked by 8 years ago
Edited by M39a9am3R 8 years ago

I'm a novice to coding, but I like Roblox and I heard Lua was a pretty easy language to learn, so I thought I'd try to learn it. So far, learning Lua is extremely overwhelming. I've read many stories of people teaching themselves how to program in this language by looking at the Wiki or looking through other people's code. I have no idea how you guys do it. I'm finding it quite difficult to figure out where exactly to use functions or where I can use if statements, etc.

I read the "How to teach yourself Lua" blog post and have been taking it's advice by starting small, I'm trying to make it so a you explode when you touch a brick. I go to the Wiki page on Explosions and I have no idea what to make of the example. It seems as though every page I go to on the Wiki, I have to constantly search up another thing that's mentioned in the Wiki page in order to get a loose understanding of what the heck I'm supposed to do. Things I didn't even know were a thing like "explosion.Blastradius" and such, the whole time I'm thinking "How am I supposed to remember all of this?"

I understand the basics of Lua, applying them is way above my head. How am I supposed to know when to use a function when I want to do something like make my guy's head spin or something? The Wiki doesn't help with this, it gives you an example and expects you to figure the rest out on your own. It doesn't tell you how to apply anything to making a game. I've tried looking elsewhere on Google and such (yes, I've looked at the Lua website) but no where does anyone show you how to apply any of this stuff to making games, but to be able to simply learn the language and everything else is up to you to figure out. I can't wrap my head around most of it.

Also, I've read that some aspects of the code (particularly print) are useless when it comes to actual game development. Is there any truth in that? How am I supposed to know what's useful and what's not? The whole thing just makes my head hurt. How can I make this whole process less overwhelming?

tl;dr: Having hard time learning language, how can I make the learning process easier?

0
Edited to remove code block. Tab is being recognized as four space presses which is used to create code blocks as well in Markdown. M39a9am3R 3210 — 8y

3 answers

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

I find the wiki as more of a tool for when you have a good understanding of how the wiki works and what the information tells you. I am like you in the way that I can't take others scripts and then find out how I would apply that on my own. The best way I have found is to just do the simplest scripts you can and the map out what exactly you are planning to do. There are many many ways to perform the same task using different functions and such. The ObjectBrowser inside of studio "Studio -> View -> ObjectBrowser" tells you all you need to know about each thing you are using such as what you can do, but it doesn't give the most in depth definitions. Object Browser tells you all events you can use with most parts of roblox. In summary, I find YouTube, Object Browser, and just asking questions and answering questions is the best way to learn. You need to stick with it and a good friend who knows how to script also helps. Just give it time and you will have an "Aha" moment and things will begin to make much more sense. Also if you haven't read scriptinghelpers.org/blog/how-to-teach-yourself-lua I recommend you do.

Ad
Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

First of all, welcome to the club. Making the decision to learn a new skill is an important one, even if you don't pursue it in the long-term. It can be fun, and there are lots of people that are able to help you.

Programming especially is something that is becoming more self-taught because it's easy to start and easy to see the results of. Many people do feel overwhelmed because in many cases it's a completely new way of thinking, and requires a reference like the the Wiki because of how complex it is. I don't know of anyone who is able to memorize everything in it, so the first thing to do is not put pressure on yourself to memorize everything. Because you can't, and there's no point anyway. (Remembering that 'explosion' has a 'BlastRadius' property is something that I don't know off the top of my head - because I can just look it up.)

The second thing to do is to take it more slowly. I'm guessing you're looking at different parts of the Wiki to understand one simple tutorial or project, and you feel like you're being dragged back and forth without really grasping a lot of what you're seeing. (Like being introduced to calculus before algebra.)

The way I learned was to examine one small part of Lua a day, and then trying to do different things with it and print(). For example, one day I just looked at conditionals - how are they evaluated, and what prints if I change this or this? What happens if the condition is not a boolean? How do elseif and else work? I worked down the Wiki page on conditionals(http://wiki.roblox.com/index.php?title=Conditional_statement), trying different things with each new topic. Then I did the exercise at the bottom.

Rinse and repeat for functions, loops, variable assignment and scope, booleans in more detail and tables and iteration. Then I started learning about the ROBLOX environment: how to use explosions and parts and values and whatever. And I'm still learning and still making mistakes every time I open ROBLOX studio. I still feel like a complete beginner.

You will probably struggle with small, simple things. Things that other people could solve almost instantly. Try to solve them yourself, and take breaks when you get tired or frustrated. Try to struggle through problems, but ask for help if you need it. If you keep at it, learn how to fix your own mistakes, and have a strong understanding of the basics, you will keep getting better. That's the way it goes with learning almost anything.

Log in to vote
0
Answered by
Probix 80
8 years ago

Learn one lesson at a time. My very first lesson was print, and we all know how easy that is. I moved on to variables,if statements,loops,function,events,tables..and so on and so forth. Just take your time, no need to rush. Sometimes you will feel overwhelm by it, but that's okay. You have plenty of resources to help you.

Just know that you can do this. You can learn no matter how hard it is. Just keep at it at your own pace.

Good luck!

Answer this question