Trying to learn scripting as a Modeler/Builder

About me

I am a Roblox Modeler, Modeler Builder, and RS Builder

What this is about

I’m looking to learn how to script and I wanted to know how Scripters today learned how to Script. That way I could learn pretty well or learn from others on how to learn semi-quick and or really well.

Contacts

If you’d like to talk more about this personally or by easier access you can contact me through Discord or Twitter.

Discord: @EnDark#8707
Twitter: @EnDarkOfficial

11 Likes

Hey!

Roblox Wiki was personally very helpful for me. I was looking through these hard tutorials and trying to see how they work line by line. Then I could understand their logic and easily modify and/or recreate.
I was also experimenting on my own. I had learned a lot of shortcuts and more efficient ways of handling things. Really helpful stuff by my opinion.

At the end I have learned the best scripting techniques such as Object Oriented Programming which really makes everything easier if you can think logically to understand programming.

It is hard to call it “learning programming”. It is more like training to make your head think more in programming way. It should be skilled in predicting bugs and creating algorithms. Learning certain patterns does not help you with anything until fully understanding them.

10 Likes

There are a few ways to learn how to script. I do minor scripting, I learned most of this by watching YouTube videos about the basics. There are other ways, such as some ROBLOX games. The one below is my main sorce if I am having trouble. Although, when I first used it, it did cost R$. That was a while back so I am not sure if it still costs R$ or the same amount.

10 Likes

Honestly, the only advantage of knowing how to build is knowing Studio’s interface well and maybe a bit of hierarchy.

Personally, my first language was actually Javascript. Lua is a perfect starter as well though.


In programming, there are two big things: principles and syntax. Syntax can be thought of as rules or a dictionary. Syntax is what makes Lua and Javascript different (they also have different use cases but I want to be very general). How you type an if statement in Javascript is completely different than typing one in Lua. But putting that aside, what you can do in Lua you can basically do in Javascript as well. Syntax is (at a high level) what makes languages different (yes, I know there are a lot of other factors but on the outside this is basically what is different between languages). Honestly though, syntax is the easy part. You can always Google it and there will (almost) always be examples of it. Syntax just interprets your understanding and manipulation of principles to the computer.

In programming, principles are something you learn once and (unless you forget) never again. What are principles you may ask? Well here is a list of them:

- The code must be written perfectly. There is no tolerance for mistakes.
- Variables store data; think of them like a jar (in reality they are just pointers)
    - Variables can be overwritten and manipulated
- Text is stored in quotes (or apostrophes). Text, in programming, are known as "strings"
- If you need to compare something, use an if statement.
- Anything that needs to be done repeatedly can be accomplished with a loop.
    - For loops are while loops that run for a limited time or iterate over a table

Those are just a few very abstract examples. These are things that stick with you no matter which language you jump to. Once you know principles like these, all you will need to know is how to make the computer execute it (syntax). The more you learn and master principles through experience is how you grow as a programmer.

Some practical advice: Unless you are super dedicated and/or a math lover, it will be super painful at first. But push through and you will learn. Trust me.

As mentioned above by @Etheroit, your brain will be trained to think analytically. I feel like the real mark of a programmer is not when you make a great creation, but when, at random moments, you imagine a great algorithm and know exactly how it will work and benefit you and/or others.

Some of the best ways to learn are watching videos, reading tutorials, and basically trying and fooling around on your own. The Roblox Wiki is a great place, not only for help with syntax, but learning these necessary principles.

Also, math plays a big part in programming. I (should) have an article coming out soon explaining why and some sources for learning.

I wish you the best in your endeavors!

12 Likes

There is a huge difference between liking and loving something.

If you like to program, then you will just try to find a quick tutorial about it and make that what you want, but after time passes by, you will lose that knowledge you’ve got from that tutorial and you will always have to look at it again and again.

However, if you love to program, then you will seriously start learning it. You will always search through internet, explore, practice and just practice to acknowledge that what you learned. You will actually be really connected to programming, which is great. You won’t stop and if you find an error, you will always try to find a solution to it. Getting errors from practicing programming will actually show you what you don’t know well. Once you find a solution, you will never do that same error again.

Programming doesn’t require only programming. It requires much more than that like mathematics, principles of electrical engineering, physics and more, but these are the main things that are really much required for learning programming professionally.

Learning LUA programming language is like any other programming languages.
It just requires time, patience and will to be successful in it.
I’ve never faced any other programming language in my primary school instead of LUA.

Actually LUA was my first and favourite programming language which I am still learning. Once I got to High School I’ve started learning C language which is quite different than LUA, but it also got some similarities.

You were asking where could you learn LUA, well the best learning site is here:
https://www.lua.org/pil/1.html
Here you can learn basics of the LUA programming language.

Thanks for reading.

17 Likes

I learned how to script by following outdated Roblox scripting tutorials. The videos didn’t really explain syntax but lua was very easy to understand. Eventually I found a tutorial on how to make a text based adventure game that solidified basic syntax in my mind. I can’t find any of the old videos I used to learn back then, but I use this LUA tutorial series playlist to freshen my memory after long breaks. Karma uses Zerobrane which is free and easy but I know you can use Roblox Studio up to the Generic for loop video, I haven’t gone past it.

3 Likes

A great thing about Roblox is that, since it is so popular, there are literally hundreds of resources available to help someone learn to script. The easiest way I’ve found to learn the basics of scripting is YouTube, and you can find some good beginner tutorial series (I’m partial to AlvinBlox as I believe he explains it better than most.) After you’ve learned the basics and can understand the coding language, use the Wiki and other resources (even if it’s just studying other people’s scripts) to advance your own understanding.

3 Likes

This is a waste of money, you can find much better resources online for free. Youtube has good resources, the Roblox wiki has good resources, and you can even browse through past posts here to look for a specific answer to something. You really shouldn’t pay people money, even if it’s only a little bit, to teach you when there’s many other alternatives.

2 Likes

It was just an option. Some people don’t always have access to YouTube and online services.

1 Like

You’re right. The fact about knowledge of multiple languages is that that it is so easy to learn the next after first. Mainly because you already know how algorithms work and can think in programming way. Else, learning is real pain. Syntax is surely different but it is not even noticeable to switch, because you know the rules.

4 Likes

It was a mix of things for me. I learned BASIC in elem/middle school by reading docs and playing around with the language. I picked up C in high school by going page-by-page with highlighter through a “Learn C Programming in X days” book (the first of many programming books I read). All of that was basically primer; I still didn’t really know where to go with it beyond modifying tutorials. In college, I was interested in IRC and spent way too much time analyzing bots line-by-line. That was about the time I first tried writing original programs of any complexity. I studied animation in school and spent time playing with Unix shells and Perl. After college I became an animator/modeler and picked up bits and pieces of a whole variety of languages in order to solve one-off problems. That was when I learned to think about coding in an abstract way that wasn’t tied to a specific language. Later, I worked in other industries as a tools programmer and had to learn to write programs that other people could rely on to do their jobs, which was another thing entirely. I attended an iOS bootcamp and learned how specialized classes could be a quick way to learn a language. After programming for ~15 yrs in languages ranging from MaxScript, Apple Script, and VBA to C/C++, Obj-C, and Perl, I settled on Python as my go to language after taking some online courses. Those courses helped drive home the value of a Comp Sci background, so I took more courses that covered general computer science, algorithms, math, etc.

After all that, picking up Studio and Lua for Roblox wasn’t too hard. :smile:

Knowing how others did it may or may not be all that helpful.
Here are some ideas that may be helpful though:

Best of luck on your journey :four_leaf_clover:

8 Likes

I feel like I’d take scripting/programming on Roblox very easy since I do know JavaScript and very little or the principles of C#.

I’ve taken a look at Peasfactory recently, he goes the most into depth with things, I already know the Basics and now learning the Advanced Scripting stuff.

Well if they had access to Roblox I’d think they would have access to YouTube, I’ll take your suggestion into mind. Not really wasting money since I can always gain it back through commissions.

Oh, you have some programming experience! That can make things easier.
There is quite a bit you can do with programming coming from an art background, especially if you understand how arrays and functions and all the rest work, and you’re able to pick up languages without too much difficulty. Eventually, you are likely to run into 3 main problem areas (at least 3…others aren’t coming to mind).

  1. Organizing the complexity of your programs.
  2. Using math to solve problems (many interesting problems/solutions involve math)
  3. Efficiency (algorithms & analysis)

Because I was schooled in art and largely picked up programming as a side venture, I struggled quite a bit with these things at different times (sometimes still). Mastery in these areas is partly what separates the hobby coders from the pros. If you feel like you understand a language pretty well but aren’t able to do anything really interesting with it, then the problem may be with one (or more) of these. I found them hard to pick up on my own and would recommend classes. Lua tutorials won’t be much help.

The way I went about learning Lua was basically this:

  1. I already knew how programming worked in general and had experience in graphics, so the main goals I set were to figure out how Lua did things relative to what I already knew and how it interfaced with the Roblox platform (how to work with the API).
  2. I did a quick survey of Lua 5.1 reserved words, types, conventions, operators, and such and found it to be a familiar mix of other things I’ve worked with before.
  3. The next step was to binge watch Roblox scripting videos: all the ones I could find on the Roblox site, and stuff by AlvinBlox, Peasfactory, whatever came up on YouTube. I also worked through a bunch of non video tutorials, including many beginner tutorials from the Roblox site. Critically, I worked through many examples myself in Studio. I have dozens of files (maybe more) saved locally that are simply worked-through examples of some specific thing. These are all labeled so I can refer back to them. I spent a few weeks doing that.
  4. After that I started working on ideas of my own without the benefit of a tutorial (some of which I had built using other platforms/languages). That was where I started to become intimately familiar with the Roblox API and the amazing documentation these folks have put together.
  5. With that under my belt I started into more traditional game design stuff with the goal of creating some very simple games. A few sketches, some simple mechanics, simple feature list was about it. The goal there was to see what it took to put together a really simple game end-to-end. How do guis work? How do I make a load screen and where do I put it? How do I make the kind of tool I sketched out and get it animated?.. on and on. Much of that ended up in local example files of how to make a shop gui or a tool that can be picked up by pressing ‘E’–a lot of which can be found easily enough on a web search.
  6. During all that, I would revisit Lua itself to see how it could better serve what I was trying to do. I looked into more obscure language features and started running into things Roblox doesn’t have implemented. I looked into tables, metatables, and OOP with Lua, and scanned through all the major Roblox objects looking for interesting events and functions.
  7. Eventually, I stumbled across how to open plugins and was able to look through several very nice examples of fairly complex, modular Lua programs. That may be a cringy thing to do, but I’ve found that having a complete, well-put-together program in its entirety to look over can be very helpful when it comes to understanding how to write code for a given language (maybe there are better sources for that kind of thing).

So, that’s 4-5 months of on-and-off messing with it, and I’m confident enough that I can do pretty much whatever I need to do with these tools. Obviously, you should follow that process exactly as written. Heh. Kidding. Your mileage may vary, but that’s more or less the path I’ve been on. Now I help my kids with their game ideas and work through interesting problems I find on the forums when I get tired of looking at my own projects. Put your coding questions on the forums if you run into issues. As you no doubt know, this is a great resource with many knowledgeable and talented members willing to share their expertise.

3 Likes

I’ve ran into the problems of how I’m going to structure code and I’ve trying to script for a year and I just kept giving up because I thought it was too hard and too complex for my brain to handle (Though it’s probably the most easiest language a Programmer could know) That and scratch at least. Or Python. But recently Peasfactory has really worked the best but again I just stopped watching the videos. If I went at scripting for the whole year I’d probably know how to do pretty much anything my mind could think of. I also run into a problem with thinking what my mind would create, I’m normally creative but when it comes to code my brain explodes and gets rid of the creativity side to me

It’s important to keep in mind that it’s totally doable. Learning to program isn’t easy, so don’t start thinking that you’re deficient in some way because things don’t click right away. As I said, I was in the process of learning my third language before I wrote anything remotely interesting that wasn’t from a tutorial. If we were talking about martial arts and you already knew a couple of styles, then it would be no big deal to learn another. Your moves would just happen the way you wanted and you could read an opponent or whatever because you would have internalized a bunch of the most important parts. Going from having never thrown a punch to being dangerous is a HARD transition. It takes work and and time and perseverance. Learning to program is not that different. There’s more to it than just picking up language syntax.

Keep working at it in small bites, and give yourself time to internalize things–especially if you are trying to learn on your own. Set small goals to give yourself a lot of little wins. Starting young was a big help to me because my expectations were so low. If I managed to make semi-colons dance across the screen or cycle the color of a rectangle it was a hugely exciting accomplishment, and that helped motivate me to learn other things. There’s no reason you can’t build Roblox/Lua skills from similarly humble beginnings.

Yeah, Python is a great one to learn. It’s widely used in education, and there are a lot of good, free online courses you can find for it. It’s reasonably close to Lua, so a lot of what you learn is transferable.

Since you are a modeler, maybe start with model related tasks that can be enhanced with code. Try adding parts. Then resize/move/rotate them. Change colors. Before you know it you’ll realize that you could easily create the foundation for a house, or a fence line, or a maze. You have to be a little careful with how-to videos since the people who make those things are not usually beginners and they’ve often done the exact build they are showing at least once before they make the video. Don’t judge your progress against the smoothness of their presentation.

Anyway, I’m rambling. Realistic goals. Lots of small wins. Persistence. Use the API reference constantly. Build gradually upon the things you already know. Give yourself time to internalize this stuff. There’s my attempt at sage advice. Dream up modeling challenges that are a pain to do other than with a script so you aren’t tempted to just do it by hand. :grinning:

4 Likes

Scripting can take a long time to learn and you can give up learning easily. My number one tip to you is to never give up.

A few people in this thread are saying to watch YouTube and read the wiki and I slightly agree with them. The wiki is a great tool once you know a little bit about scripting but it isn’t such a great tool if you know nothing about scripting. When I was starting out I found the wiki very confusing however the API page will be your best friend once you know a little bit about scripting. YouTube is a great tool for starting out and I would recommend AlvinBlox beginner series. Try to write the code as you go along, this way you will may pick up what he is talking about more.

I started to learned to script by looking at a free piece of code and I tried to figure out what it did. It took a while as I had no prior knowledge of scripting, as you have some prior knowledge you may find this easier than I did.

Try and set yourself goals that you want to be able to achieve. For example I wanted to make some custom admin commands all those years ago. Doing this will make it feel like you are achieving something and it will make you more inclined to carry on learning to script.

The last tip is to use the dev forum. This is by far the best tool for learning to script, lets say you are really struggling on a piece of code, you could ask the dev forum and someone will be able to solve your issue. Try to figure out the problem by yourself first as you will learn more than someone just giving you the answer. Solving the problem yourself will teach you how to solve bigger problems later on when scripting. The dev forum has lots of community tutorials on various different things, they are all written very well and you should learn something from them.

3 Likes

First of all, it’s great to have a programming pillar in the thread with us!!

But yes, to expand on one of your points: Math is fundamental to programming. (I have an article coming out soon-ish on this.) If you don’t understand math, not only will you not be great in programming but when you encounter Vector or CFrame math you will fall apart. Now I’m not saying to go master matrix multiplication as I have (BTW I mastered it for my work in neural networks, not CFrames), but fool around with CFrame multiplication and stuff. Get to know it. And don’t only play with it in Roblox; use online 4x4 matrix multipliers so you can prove to yourself random things like why multiplying a positional CFrame and a new CFrame.Angles is equivalent to adding them. The more you play with it the more it will start turning into something you (may) enjoy and something that you are learning to master.

2 Likes

Look, many people will give you entire paragraphs on what to do and what not to do but in the end it just comes down to if you’re willing to practice.

Scripting is like drawing, it’s difficult to understand in the beginning but with some anatomy (syntax) and lines (api knowledge) and ultimately practice,you can make something 2d look 3d.

Now, getting the vocabulary is always necessary so passing by the Roblox API page is of utmost importance. And if you practice with videos that’s fine too. Hell, I even recommend passing by Code Review just to see what a script usually looks like.

That’s all folks.

1 Like