Learning & Studying Scripting

“You must practice scripting if you want to learn!” is probably the most frequent answer to the most frequent question; “how do you learn scripting?”. Yes, you’re right, if you want to learn scripting, do practice it, but…isn’t that answer a little bit too vague?

I myself am no scripter, obviously. I’ve planned several games, but never managed to get skilled enough in scripting to learn my way through a project and actually turn any of those games into reality, and that because I’ve always got stuck on the learning process.

I’ve learned the basics, I’m familiarized with data types, creation of variables, functions, statements and conditions, yet I don’t really know how to push that knowledge forwards. The most frequent answer - “do something, practice” - seems too vague for me in that question.

How am I going to learn how to do something if I don’t know what “something” is?

How am I supposed to do “Z” without knowing that I’ll need “X” and “Y” first? How am I supposed to figure out “X” and “Y” if I don’t know what are they? Am I supposed to ask in the DevForum everything until suddenly I don’t need to do so as frequently?

How do I teach myself to learn scripting?

How did YOU learn to learn scripting?

How do you actually practice scripting when you don’t know how to figure out what is it you currently need to learn?

A pianist can practice the piano ““by himself””, but someone who only knows the basics and nothing else, can’t.

Yes, I’m aware that I’m terrible at explaining what I mean.

7 Likes

Yeah, I also find that it’s alright learning code, but I find it hard to find examples of places I would use it or can practice it.

5 Likes

Learn how to use official resources effectively
-Developer Hub: Contains official tutorials and guides to Roblox development.
-API Reference: Contains exactly how to use every single class and datatype, function and event.
-Developer Forum: If you get stuck, ask a question here, on #help-and-feedback:scripting-support.
(tip: if you’re having trouble getting the correct result from google or whatever search engine you use, try adding “api” to the end of your search query)

When I started Roblox development, I watched tutorials, but the problem is, the tutorials I watched didn’t really explain what was going on, why they were using this mysterious “Enum” instead typing out the name of something, why people used Vector3s instead of tables or individual numbers. After a little bit, I realized that I shouldn’t be using Youtube as my main source of information. So, I started googling, and found the developer hub and this very complicated looking “API reference manual”. Eventually, I figured out how to use the API reference properly. At this point, I barely looked at tutorials, and saw figuring things out on my own as a challenge, and when I succeeded, it felt pretty empowering. I mostly used the API Reference, the developer hub and the developer forum as my main source of information, and I still do.

Trying to script without knowing how to is a pretty dumb idea. Before I knew the syntax of scripting, well, I just copied down whatever was on screen on Youtube tutorials. Eventually I remembered where you put equal signs and periods, where and where not to declare variables.

Of course, this was just how I learnt scripting. Apparently a lot of other people learnt it by looking at the code of freemodels.

8 Likes

I learned scripting from reading free model scripts atleast from the past, and it’s not that bad but I can consider it ok. However, YouTube tutorial s will tell you to copy-paste code and learn nothing from it , so the best option might be reading wikis like developer.roblox
.com , because it explains alot and has almost all of the documentation you may need.

Right now I just Google it or find it in the wikis , and I consider it a good way , for example I wanted to get the user using the plugin, because there was no free model nor YouTube videos, I found it on the wikis , it was

game:GetService("StudioService"):GetUserId()

OK,I guess the wiki didn’t really explain it but because it was pretty obvious on what it does, so I suggest you learn functions, coding from the wiki or Google it

Also, if you can’t find results on how to do this in scripting for example, devforum will help like we are rn, all you do is ask and type in the details.

RESOURCES THAT MAY HELP:
developer.roblox.com

http://devforum.roblox.com

3 Likes

That is one of my biggest issues with tutorials, love seeing that I’m not the only one bothered. All my experience with Lua has come from a single channel that actually taught me about the language, what every single thing did, when they should be used, and such. After said channel suddenly disappeared, I could never find a single channel (with the exception of TheDevKing and AlvinBlox) with content that would help me keep improving; most “scripting tutorials” on Youtube are less than 5 minutes, and its not really that surprising that all you’ll see within those “tutorials” is a timelapse of the code being typed in, with little to no explanation, followed by the script/model on the description so you can paste in.

My mistake, I could have worded out better what I meant. I don’t mean not knowing the syntaxes, or basic coding knowledge, what I truly meant was, how are you supposed to push your scripting skills forwards with only what you know? Using another example, a basic character Flight, how am I going to search up the requirements for that objective without knowing about them? How am I supposed to look up something in the API if I don’t know what I’m looking for in the first place?

Thank you for the in-depth answer to my mess of a question :pray:

2 Likes

I’ve been scripting for well over 2 years now. The first half or so year was a huge pain as I didn’t know the forum existed so I all my questions I had to answer myself. I’ve quit and come back to scripting a couple of times, more or less due to my passion for creating. The only reason I found out about the forum was that I emailed Roblox support about an error I had with my code :sweat_smile:. I mean, you can’t blame me, I was stuck on the same problem for days and hours on end.

Coding in general has a high skill ceiling, but it doesn’t really get much higher than that. The other parts of scripting are basically memorization of algorithms and how to put one and one together. Once you grasp the logic of scripting, learning new things or even different languages is exponentially easier.

It seems like you’ve got the hang of the basics (the other things you might want to learn are metatables and metamethods if you’re not on that already). That’s really all you need to start creating simple projects, or even large projects. I find that creating projects help me learn how to combine one aspect in scripting (such as data management) with another (such as visuals). You learn a lot from the mistakes you make in a project. I tend to go back and forth over the numerous games I want to make and almost every single time I have something I can improve on the project from the learning I did with my previous game.

This part of learning coding is more or less about trying to find how to structure your game framework, and how everything can communicate with eachother.


Good luck with your journey!

3 Likes

can you teach me how to read the api

The top of the API page for something usually contains a description of that thing

The API is divided into 3 catagories: properties, functions and events

In any section, clicking on green text will lead you to a data type API page (things like numbers, booleans, and Vector3s are data types). The reason the green text is there differs from section to section

  • In the properties section, green text means what the type of the property is, for example, WalkSpeed is a float, which is just a fancy way of saying a number that can have decimals.

  • In the functions section it means what the function returns and what parameter types the function takes in.

  • In the events section it means what type is passed along with the event.

You can always click the purple text to go to a dedicated API page for that property/function/event, which will contain a more in-depth explanation rather than the sentence long short explanation given in the main API page.

You can also find an “Inherited from ____” sub section in the API sections, for example, because the Humanoid is an Instance, it inherits from Instance, meaning it by default has properties such as .Parent and functions such as :FindFirstChild.

The bottom of the API page might sometimes contain a code example on how to use the class

I’m not really good at explaining things but I hope it helped you grasp the API reference a bit better :slight_smile:

4 Likes

you are a goated gamer very good

Thank you! This was pretty helpful although I have been scripting for months now!

1 Like

There is another thing you can use to learn how to script that is not listed and it is called Lua learning you see Lua learning has everything you need to learn scripting i has lessons, it has tutorials, and it is also less confusing then The dev hub this is what i use mainly to learn scripting Lua learning is free and does not cost a thing to learn the developer is constantly updating this game. and adding new features the features Lua learning offers is Lessons. tutorials, sandbox and much more the possibilities with Lua learning are endless. it does not have a lot of lessons at the moment, but they are adding more, and the tutorials are really easy to follow and get used to i recommend any new programmer to use Lua learning as it is the best hands down.
Try Lua learning Link: [Lua Learning - Roblox] (Lua Learning - Roblox)

2 Likes