Beginning with Scripting

Hey developers!

I am wishing to find out how you got started with scripting, how you learned, what source was useful, and what the difficulty was while learning.

Thanks!

7 Likes

Haha, this question. There’s been a lot of questions like this and it always makes me curious to see where people started.

For me personally, I’ve had an interest in Roblox Studio since I was around 9 years old. I took apart games that Rudimentality developers open sourced and learned from there. Pure trial and error. I hate tutorials with a passion and I only use the Wiki as a reference point. My knowledge is still fairly limited but I’m learning.

1 Like

I started learning when I was 9 years old, but for fun, I entered this page: https://scratch.mit.edu/ (Is for kids), it not will teach you how to program LUA at all, but you will understand how programming works, but that was the way I started to learn and to be interested, if you want to learn I recommend you to visit this page: https://developer.roblox.com/learn-roblox/all-tutorials, choose the tutorial that most interests you or looks less complicated, and one by one you will make them and you will understand how the codes work, If you don’t understand something you can look it up on that same page. You can also watch YouTube Tutorials, which there are many.

3 Likes

I started sometime in elementary school with Lua except I couldn’t really do much apart from edit scripts. I messed around with Lua a bit and eventually knew some basic concepts. I saw this website that Osyris made and wanted to make something similar so he sent me to Codecademy and I spent some time there. I learned HTML, CSS (really good for learning to format code even though it’s just website formatting and structure) and dabbled in some other stuff (PHP, JavaScript) that eventually exposed me to the fundamentals of programming languages. When you understand the fundamentals, all that matters is knowing the syntax of the new language you’re trying to learn. As time progresses, syntax isn’t a barrier because you can just read the code naturally.

When you become “good”, the only difficulty you’ll have is most likely learning how to use advanced frameworks and code structures that make your code more efficient. I think the key idea to keep in mind is that you never become 100% knowledgable with languages but you do become better overtime. You realize your mistakes and learn from them.

In my opinion, YouTube videos that teach you how to do something and show you all the code aren’t really helpful. The best way to learn how to script is through trial and error. YouTube videos just show you the “right” way to do certain things but you don’t really learn why you’re not supposed to do something else unless you find out for yourself. Nowadays there are things like the Roblox Wiki that can help you get started and honestly I recommend it. When you become familiar with how Lua works and its syntax, you probably won’t need to return back to the wiki unless you’re looking for something in the API.

4 Likes

I tore apart small scripts and learned by just studying what others had done before me. For instance, a part creator, or a teaming script. That sort of taught me about functions & events. Later on I started using the wiki, and after that I went onto codecademy.com and learned Python. Now I’m taking a class on Java and I got a 99% first semester (everyone else literally failed lmao I just shared my projects with them the entire year) but yea there is a lot to know but luckily a lot of info can be passed into other languages once you learn one.

It’s also important to note that API’s (application programming interface) are a crucial part of coding and they are specific to a single environment, so a roblox Lua script might look completely different than a Stingray or Cryengine Lua script, but the fundamentals are the same.

I hope I didn’t confuse you with API - it’s basically just things like part:Destroy() whereas in Stingray it might be mesh.Nullify() or something. Basically the same, just a tad different. I’ve been around a while.

3 Likes

I started to learn to code generally when starting my GCSE computer science course. From then a few years later, it made it a lot easier to pick up Lua because I had a general understanding of the 3 elements that make up code: Seqence, selection and iteration.

Now believe it or not, when I first started, I didn’t try and code an entire game (although that was quick to follow and demonstrates why we learn first :smile:). One of the first things I did was to open a baseplate, build a pc monitor and try and get it to turn on and off. It was very simple and not efficient but it gave me a surprisingly good insight into how Lua is structured compared to other languages.

I’m with @colbert2677 in saying that I don’t like tutorials but one thing I do use - alongside the wiki - is a thing built in to studio called the object browser. This shows you everything that a programmer has access to in studio and allows you to click on something like a part instance and it shows you all of the different functions and events that can be used with that part instance. If you click on an event or function, it shows you the proper argument layout and how to use it.

In the end, it’s all about how you learn best and it just takes time and patience, knowing that not everything you make will work first time. You will have to tweak many thing to make it as you want it.

3 Likes

I just inserted a bunch of free models into my game and played with friends, and then one day came across a droid model that had a controller with it, which allowed you to select it and move it about.

Then I had the daft idea to change the droid model to look like something like a Beyblade, put spikes on the side, copied and paste a bunch of timess and voilĂ , me and my friends could Beyblade battle together on Roblox.

As time went on I looked more into the controller to see how it worked, learned keyboard inputs, how to make the humanoid jump, changed speed and health.

Took a look at the spike kill scripts, learned how touch events work, changed how much damage scripts did, added knockback, etc.

Little by little I added more, til I had around 80 fairly detailed Beyblades, a simple but fun combat system, and custom special moves and abilities for each Beyblade. I even created custom Beyblades for a while.

In the end my place achieved around 1.5million plays over the years, which is probably chump change these days, but for me was absolutely astounding.

Not to bad for a ffree model droid and a couple of spike scripts.
Granted, it sounds corny but without my friends and the Beyblade community, my game never would have taken off.


Also, finally someone else who acknowledges the object browser, one of the best tools for self learning. I used this so much. :D [quote="RedDuck765, post:6, topic:217113"] alongside the wiki - is a thing built in to studio called the object browser. This shows you everything that a programmer has access to in studio and allows you to click on something like a part instance and it shows you all of the different functions and events that can be used with that part instance. If you click on an event or function, it shows you the proper argument layout and how to use it. [/quote]

One of the really cool things I’ve found from my time on Roblox, is that even though I’m a naturally shy person, I’ve often used my experience in studio to teach other people, both on Roblox, on YouTube, and even in college where I studied Level 3 IT.
Even when it came to completely different engines and languages.

2 Likes

:grin:

1 Like

I started when I was 12. Back then, I was fascinated with RPG games and wanted to make my own. If the old forum still existed, I’d point you to some of the noobish questions I asked like, “how do you give an NPC levels?” or “how can I make a horse?”. Eventually I gave up on trying to ask others for help (I was too dumb to be helped), rolled up my sleeves, and started using free models. lol

Over time, I’d want to change how a “giver” worked (for anyone who still knows what that is, I haven’t seen many now days), or the peopled allowed through a VIP only door. At one point I decided that It would be really cool if I could actually make some of these things myself; I printed an entire VIP door script, set it up by my monitor, and typed it nearly character for character. I was so proud of myself for making my first script! lol

If any of you remember @Davidii, he made one of the most popular games back then called the Survival series. I played Survival 303 a lot, and survival 404 when it came out. On a side note, I also played Build An Empire a lot too. Before Davidii open sourced his games, I worked for a couple months on a game I called Survival 505. I never released it, but working on it taught me a lot. It was the first game that I had built without free models. When he open sourced his games, I took a glance through the code later and worked on another survival game based on it for a time.

Over the years I’ve gone from one project to the next, always learning. I the next project I can remember was a foliage generator for the survival game. Then a pathfinder, a hexagonal maze generator, putting it onto a geodome, a voxelizer, a Lua bytecode parser, and as of late a GLR parser. Some of these things can be seen here:

To summarize how I learned: editing free models, reading the wiki, trying to make popular games, editing open source games, and always having an interesting project.

3 Likes

A year or two ago, @colbert2677 told me when I held a position in a group of his, that (as he mentioned above) that the way he learnt was by analyzing open sourced (uncopylocked) games. He then proceeded to provide me with 2 - 3 uncopylocked games which I proceeded to explore. This was my first real introduction to scripting. I spent a very long time reading the code and changing it around to do what I wanted it to do. This is a way that I suggest learning. It helped me a lot! I mean, look where I am now! Other than that, I also recommend the wiki. That was quite helpful.

@colbert2677 Due to a falling out in that group, I never got to say this. But thank you, if it weren’t for your advice back then, I don’t think I’d be talking here right now. Thank you.

edit: as @Qxest said, codecademy was sorta helpful when I first began doing any programming at all. though I’m not sure if they have any courses on lua

3 Likes

I started last year to want to develop. I just wanted to make an obby and I, of course not knowing scripting at the time, used FMs.
I learned some info from the FMs, but going to be honest, I learned a lot more from the wiki and tutorials from AlvinBlox.
Disclaimer - tutorials aren’t really meant for learning, use the wikis instead
Anyway, I used code from the tutorial, looked up what it did, how to use it, what it will do, and from there learned a lot of the basic functions and events. I would REALLY recommend using the wiki, can’t stress it enough.
As my uncle (a web developer who knows an extensive number of scripting languages) says, “Most languages don’t have a lot to know, it’s all really basic information, put together, to make something more complex.” I mean a lot of scripting is really simple, you just figure out what everything means as you go along and learn from there.
If you’re into it you will definitely delve deeper and learn more.
Best of luck to you and I hope you really get into it and make amazing creations!

EDIT:
I do want to add, I, in my own opinion, am a sub par with scripting in trello to my games (it really isn’t that hard to grasp), but I learned that from an open sourced trello application center. Dissecting stuff like that really helps.

1 Like

I wanted to be cool like the other Scripters so I started to learn. I ended up learning through a variety of sources but perhaps unfortunately my original source was Person299’s commands. If you’ve never seen the source of V2 of those I’ll summarize them with a single line from the code:

end end end -- I really like it when all the ends are on the same line, don't you?

After I learned the basics of how to make Lua functional I ended up using the wiki to make it better and using trial and error to make it pretty and not slow as heck. I’ve actually ended up using it in all manner of places, from Minecraft to making Discord bots, so it’s worked out I think.

The main difficulty for me was probably just learning what everything was called. Learning resources get a lot easier once you know the vocabulary, and this applies to every language and subject. Once you know that you can generally get what you want through asking or through googling.

Also plz @Nightrains it’s Lua not LUA. :frowning:

1 Like

I read books. They were mostly about JavaScript, and I usually skipped the text and jumped into looking at the code instead. I changed parts of the code to figure out what it did, and started creating my own snippets.

Most of my difficulties have been rooted in me not understanding the abstract concepts and computer science behind what I had written. The lack of formal education and my ineffective learning method (if you paid attention in the last paragraph, you might have noticed that it was actually trial and error) are probably why this is. So, I ended up abusing callbacks in all the wrong ways, and being limited to the simplest data structures.

I have only had one person teach me how to code, but it only lasted briefly and she wasn’t in touch with today’s technology (she tried to teach me Visual Basic 6). I might be much more competent this were not the case.

So, my advice comes down to: Get somebody who is known to be competent to help you, and make sure you understand what you’re doing. Additionally, be persistent. I have never written code that worked perfectly on the first try, and seldom have I written code that worked at all.

1 Like