How do I learn scripting efficiently?

I have been trying to learn scripting/programming for sometime now, ~5 years. However; I have never been able to learn. I have watched YouTube, looked at the (old) forum, read multiple books, and have never been able to learn past about the intermediate stage. I think I know a lot of the vocabulary and such, but I just have a hard time figuring out how it all works and putting it together. How do I learn to do that and advance my knowledge? Thanks in advance.

14 Likes

Hey, this is a WONDERFUL question. I was faced with a very similar situation a few years ago. I feel like your approach to programming may be the problem, as that was my problem. I was focusing too much on just knowing how to write code, rather than my problem solving skills. Chances are, at the intermediate stage, you should have a lot of the knowledge you need to create wonderful things. More than likely, you’ll never have every single possible thing memorized, and that’s alright. Just utilize resources such as the wiki and this forum to advance your scripting career.

For a thorough understanding of basic and intermediate level scripting, I recommend PeasFactory’s Beginners and Advanced series. From that point on, simply utilize your resources correctly and keep practicing. Push your limits and try making things you feel like you’re not ready to make, as it will motivate you to research new things which you will ultimately learn.

15 Likes

Thank you for your response! I will definitely try these things!

4 Likes

I strongly recommend giving yourself a daily snack break challenge. I started doing this about a year ago, Just think about something that’d be fun to make, and try to do it.
When I did this, I learned a lot more in a single month, than I had in a whole year.

If for some reason you can’t go on ROBLOX Studio, you can use repl.it
It will execute Lua on almost any device. Despite the limited interface (console), you can still do amazing things!

5 Likes

So I just think of something and try/learn how to make it? That is a stellar idea, thank you!

3 Likes

A good way to learn scripting is to make a game. The whole purpose of learning to code (in depth) is so that you have the knowledge for making a product (at least for developers). If you pursue making a product (in this case a game or something), you will have to learn how to code something that complex.

Years ago, I wanted to make an FPS game, but I didn’t have the knowledge required to develop a game that complex. I learned so much about networks / remote events, and GUI design during that time. While I didn’t get too far in development for that game, I learned so much which is why I am able to develop the game that I am working on now.

7 Likes

In-general, scripting is developed overtime. It is a case by case basis, it’s not something you can study and learn efficiently. My advice is to make a game you are passionate about, and step-by-step figure out how to make things. Scripting is 90% figuring out ways to do something, and 10% actually scripting.

However, for finding resources to apply in those case-to-case situations, here are a few good resources to use:

Dev Forum
Developer API
PeasFactory’s Basic Scripting Tutorial Playlist
Official Roblox Scripting Tutorial Playlist
Lua Learning by Boatbomber

This is a good list of things to get you started with scripting, both the basics and trying to find solutions to one-time problems.

7 Likes

The best way to learn efficiently is to read API Reference daily and see youtube videos about what you read at API Reference, then when you read alot of API Reference you can go to next level and join gamejams. Gamejams are good because they teach you how to work with a team and be creative. Note that gamejams will never be something that you don’t need because you always learn something from it! And always remember that you’ll never know everything so it’s normal to not knowing something (Everyone here is human and always need to learn more and more). Another thing is: ALWAYS use google when you don’t know what to do! Google is best friend for developers.

6 Likes

I like that this question is a little different from the thousands of “how do I learn scripting?” questions because it asks how to do so efficiently in terms of putting things together rather than some ambiguous question about delving into things in general.

A lot of the effort that you’re going to be doing in coding is learning language semantics and how to put things together to create systems, more than how to actually write the code to make a program to work. There’s a divide between understanding how to write the code and knowing what exactly is happening when that code is executed.

Everyone is going to have a different process. For me, I am a hands-on learner, so my first coding experience ~8 years ago was to break apart uncopylocked Roblox games and look through the sources. I took this in, experimented with it and consulted the Wiki if I had any difficulties. I never had any formal start into it, I built my knowledge from the works of others.

If you’ve been doing everything you can - videos, Wiki and books - but those aren’t working, that’s a strong indicator that you need to start changing up your strategy. Start with looking through some existing items and articles: reform any basic knowledge you think you may need. Start tinkering around in Studio and make assets just for the heck of understanding how to work things out. Eventually, that horsing around will help you form a strong foundation to work from.

If you need any reassurance about the process to learning, I have a bunch of funny and stupid stories about my path to learning coding. At one point, for example, I thought that DataStores and CFrames were extremely advanced systems and would just plaster those words over my works to make myself sound competent. Pretty much everyone uses them though.

Some more reassurance: I don’t know if you’re familiar with object-oriented programming or not, but I think presenting you with two code samples should be enough in regards to information. Only around 2 years ago, this was my understanding of OOP-in-Lua classes. Despite there being examples of how to make pseudoclasses, I somehow managed to botch it.

local BankAccount = {
	Cash = 0,
	Withdraw = function(self, value)
		self.Cash = self.Cash - value
	end,
}

function BankAccount:Deposit(value)
	self.Cash = self.Cash + value
end

print(BankAccount.Cash)
BankAccount:Withdraw(50)
print(BankAccount.Cash)
BankAccount.Deposit(BankAccount, 15)
print(BankAccount.Cash)

And this is me now. Minor flex.

local function tostringMetaFunc(self)
    return self.__superproperty
end

local Super = {}
Super.__index = Super
Super.__tostring = tostringMetaFunc
Super.__superproperty = "Abstract"

local Sub = setmetatable({}, Super)
Sub.__index = Sub
Sub.__tostring = tostringMetaFunc

function Super.new()
    return setmetatable({}, Super)
end

function Sub.new()
    return setmetatable({}, Sub)
end

local SuperObject = Super.new()
local SubObject = Sub.new()

print(SuperObject)
print(SubObject)

And finally, a third point of reassurance: I still feel like I have a lot more to learn, despite what I can currently do. I feel like a beginner still. I don’t allow myself to get complacent with this though: there is always a learning opportunity at some corner.

In the end, how you choose to learn to code is up to you. Do you want to start by understanding how to write things out, or do you want to understand the details behind implementations? I’d definitely recommend the former, so you can analyse what you’ve written.

Good luck.

16 Likes

I wish I could double like this comment. Very well thought out and it really helped me to move forward I feel. I’ll take it to heart, and hopefully it will help me. Thank you!

3 Likes

Hi! I’m still a budding developer, and I’ve shared a lot of the frustrations that come with finding a good start. But here’s a few nuggets of developing wisdom that I’ve been using to start building:

  1. The Developer API is your best friend; there’s no shame in referencing it as much as you need to! Experienced developers don’t have every single property or object memorized, and looking stuff up helps you learn!

  2. Like with any artform or skill, start small! If it’s your first time building, make small projects, then go for slightly bigger tasks each time. This will help you gain a ton of experience without being set up for failure. Immediately handling a big project from the start is an easy trap to fall into since it’s difficult to learn all of the unknown things all at once. I can’t stress this enough since I’ve sunken weeks and months’ worth of time into something that I didn’t learn much from.
    Experimenting in a small environment is key!

  3. Any amount of learning progress is good, even if you spent 5 hours to implement 5 seconds of new content you’re proud of. Coding is time-consuming; don’t beat yourself over the head if you think you’ve wasted those 5 hours–they were put to good use!

  4. If you need help, ask! If you have a small group of friends or even 1 friend to consult who has similar experience as you, you can learn from mistakes much faster! If you can’t find anyone to help, check the forums to see if anyone else has encountered and solved the same problem!

  5. Don’t compare someone else’s masterpieces to your own work; that is another trap that I’ve fallen into. It’s easy to give up, thinking “I’ll never make something as the game I’m playing now.” More often than not, a lot of frontpage games have a team of experienced builders. If you make something you’re proud of–regardless of how small–be proud of it! Chances are, those experienced builders were in the same situation as you are in now.

  6. If there’s any Computer Science or Coding course offered at your school, TAKE IT! Even if you’re not learning Lua specifically, many coding languages are built upon the same foundation of ideas. You’ll learn techniques that you may not have learned only by experimenting on your own.

I hope these tips helped; good luck on your scripting journey!

8 Likes

When I started programming (8 years ago), I was motivated by being able to create a game, wasting half of those years into attempting to make something I was incapable of lead to me taking it slow (since I was trying to rush things). My suggestion would be if you want to focus on learning, don’t just read tutorials or watch youtube videos, once you learn it put it into practice. That is extremely important of being able to use it rather then “just knowing”. Another thing is to know if you really know it is to teach it. By teaching the concept to someone shows that you understand the concept which proves that you learned the concept. It’s a process of learning, applying and finally being able to re teach it to someone else.

5 Likes

I’ve got a couple of suggestions for you.
I started to code/script in 2015/16 and I learned it rather efficiently. I first started by just getting scripts from the toolbox and figuring out how they worked and altering them a bit so they did something different. This was a great way to start off with as I could experience more advanced scripts while also learning myself. The next thing I recommend is to just ask. There are multiple websites that are great for asking for scripting help, such as this one. My last suggestion is to watch YouTube videos and look at other forms of tutorials as they are usually well explained and can help you learn a lot of new stuff.
Good luck with future developing and I hope this helped!

2 Likes

Just wanted to chime in here and give my 2¢:

First of all, don’t feel bad about not being where you want to be after 5 years. Everyone is different. Also, you don’t need to completely memorize everything. Most people just look at API reference or google if they can’t remember something.

Not sure if this will apply to you, but in school, you probably first learned how to perform addition by adding 1+1, not 5183 + 13541. The same thing applies to something you don’t understand yet, regardless of how long you have been working at it. My point is, there’s no shame in asking a “stupid question” or doing the basics if you don’t feel like you are at the level you want to be.

To effectively learn programming, you need to understand the general concept of programming, then specific grammar/vocabulary for programming terms (the RBX.Lua API in this case) and finally you need to practice, a LOT.

For example, let’s say you are like I was roughly a year ago and struggle a lot with a concept like CFraming. The best way to get good at it is to practice both ambiguous CFraming (the general concept, ie move a brick in a certan way) and second to make a game that relys on a mechanic you want to learn better.

Another great way to learn is through reverse engineering. Take a look at someone’s code, and try to figure out how it works. I learned how to program through looking at people’s code.

You also will want to use the Wiki. Not only can you follow tutorials, but you can also use the powerful API documentation library.

For example if you want to learn what parameters / arguments you pass to a CFrame.new() call, the API reference can tell you:

Finally, dont stress about anything. I’ve been programming for over 8 years and still google stuff I don’t know or understand yet, lol.

As others have said, the best way to learn is by doing. Don’t be afraid to google or to post to here / scriptinghelpers if you need help with anything.

4 Likes

Oh wow! What chances! I came on here, just now, and asked myself the same exact question you just asked everyone 7 days ago. I have been scripting for about 5 years as well and I feel like i’m at a point far lower than I should be for doing it this long. I know the basics of scripting and some intermediate, (at least I think so, i have no clue how to judge what level I am at) but I feel like I am at a point where I don’t know what to learn next. I keep on trying to make games with my code but I have still never finished a game idea. I have over 50 places with 60% “completed” games. :frowning: . Just thought that I need to say something about where I am at right now and i’m taking in everything else people have already posted. Thank you for not making me post another thread!

2 Likes