How to get better at programming on Roblox.

  • In this guide, I'll be covering the essential knowledge needed to program anything easily without any prior experience in that particular aspect of developing. By the end of this tutorial, you should be better equipped to tackle the problems you are currently facing and will face with confidence. This is just a reference on how to get to that state, not an actual intelligence awarder. The concepts covered here can't really be learned through a tutorial, but they can be learned by keeping what you saw in this tutorial in mind and intentionally practicing specific, related skills in order to get better.

    The main difference between a good programmer and a bad programmer is Computer Science. By Computer Science, I'm referring to the ability to create algorithms to solve problems and logically think through an issue until it becomes trivial enough to program with ease. Learning to program is easy. The main issue that gets people is the applications. For instance, I know that

    for i = 1, 100 do

    prints one through one hundred. However, as soon as I run into an unfamiliar problem, it's like I forget about this useful piece of information and just write twenty lines where five would suffice. That's one key strength of the Computer Scientist. He or she knows the limits of his or her knowledge and can easily discern when to apply it.

    Now that we've got this idea of a Computer Scientist in mind, I'd like to briefly discuss the issues with Roblox scripting tutorials on YouTube. While they can be a decent source for learning how to program, they never teach how to think (most of them don't even teach how to program well, but that's beside the point). You can easily find a tutorial for a door that opens and use that for your game. However, as soon as you run into a slightly different scenario, such as needing to open the door when a command is issued, you're lost. That first tutorial didn't teach you how to think. It just gave you the code for how to open the door in one specific way. You basically end up looking for a tutorial whenever you need to make a new element of your game. That is neither ideal nor efficient.

    This is where Computer Science steps in to save the day. What if I told you that I have little to no knowledge of the methods in Roblox? What if I told you that I don't really know any functions or any special algorithms? What if I told you, that, in spite of lacking all that knowledge, I'm a decent programmer? I probably couldn't tell you how to do any of the things that Alvin_Blox teaches in his tutorials. How, then, am I writing this tutorial? It's simple. A programmer only needs to know a few crucial things in order to program well. These few pieces of knowledge are what constitute most of Computer Science. Here's a list:

    • Basic comprehension of structures such as variables, loops, functions, etc. and how to fit them together to form a logical structure

    Wow, that's a short list. What about syntax? What about programming language? Here's the cool thing about being a programmer: While you may gain a deep knowledge of specific elements of a language and benefit by that knowledge, you don't need it to do well. Here's why: With the age of the internet, anything is usually found within seconds of searching it on google. I can figure out how to declare a variable within seconds. As long as I have the underlying structures in mind, I can program anything. I've been able to help people with their Java homework even though I have zero experience in that language.

    This means that you need to stop looking up tutorials that only give code. At first, it means some significant time investment and learning. However, it's well worth the time. Once you learn it, it's pretty hard to unlearn, and once it's learned, you can't really learn more of it. You can just learn more of a particular language's usefulness in a particular part of the logic you've already learned. Now you might be wondering, without the tutorials, how do I learn this stuff (I don't think most of those tutorials help learning, but I digress)? For one, the Roblox Scripting tutorials are usually the badly made ones. I've found many good tutorials on Lua and on other programming languages. Also, Stack Overflow, while it does have a few crummy answers/questions here and there, is a great resource for learning a particular piece of Computer Science logic.

    While the concepts in Computer Science are not really language specific, you can still learn them through the practice put into programming in a language like Lua. I'll admit that, because Lua is a higher level language, some of the concepts learned through it won't really apply in lower level languages. However, it's still a good language and does help get a grasp on some of the ideas.

    My number one advice: Don't make a game before knowing how to make it. I see too many people with little to no skill trying to make a game before they are ready. It's not beneficial. You've got to be on the edge between easy and difficulty to the point of inability to learn. After practicing various concepts in programming for half a year or more, I was finally able to attempt to make a game, and it actually went well (I didn't make it on this account, so you probably will never find it ;)). My number two advice: Practice practice practice. Never underestimate the value of practicing.

    Specific ways to improve:

    • Try out the Snack Break Problems
    • Read through questions on this site and try to find the logic that connects them all together (people are always asking similar questions, so this shouldn't be hard)
    • Try to answer questions that you are able to. This will expand your knowledge and help you to more quickly make connections. I've always been better at formulating ideas when I'm writing or speaking to someone about those ideas.
    • Read the PiL
    • Read the Roblox API and try to think how certain methods could be written in Lua.

    Once you've got a grasp on the concepts, programming is as simple as "I want to do a." If I know how to do a in the language I'm in, then I do it. If I don't, I find out how to do a or a variation on a (because some languages work differently). In Roblox Lua, you can easily look up how to do something either in the PiL, the Lua 5.1 Reference Manual, Stack Overflow, Roblox DevForums, and/or the Roblox API. Stack Overflow is an amazing resource in many languages, and I highly recommend it.

  • you forgot the tldr

    also, I never read the PiL, except for that one time I desperately needed to learn metatables.
    snack break problems 2 diffecult l0l0l0

  • Note that, when I say "Roblox Lua," I'm just referring to programming on Roblox. There is little to no difference between Lua and the Lua implemented on Roblox. You can read about this from these sources:

    Thus, learning Lua is just as good as learning the Roblox implementation. Once you know Lua, you will just need to look up Roblox methods when you want to do something new.

Log in to reply

Looks like your connection to Scripting Helpers was lost, please wait while we try to reconnect.