Hello everyone! I’m BearByte (currently, name due to change soon). I’ve been playing Roblox for about 4 years now and I’m looking to start developing games. Although, I’m having some trouble understanding Roblox’s programming environment.
I’m fluent in Java & JavaScript and I know a bit of C++ and Python. I’ve went through the Roblox Wiki and the Roblox API-Reference, but I can’t wrap my head around it. Any suggestions on ways to get comfortable with RBX.Lua? Or any resources I could use to learn (books, videos, websites, etc.)?
I myself am no programming master, but I think I can help a little.
I think one of the best ways to learn is to just play around. Over time and through trial and error you can get pretty good. Along with that, there are plenty of tutorials on YouTube if you want to learn about a certain subject.
Definitely start by learning Lua by itself. Stop by lua.org and grab the binaries, start playing around with code, follow some tutorials online, read through Programming in Lua, check Roblox’s Intro to Scripting.
Everyone learns differently so there may be different sources based on how you learn.
If you like to just jump right into it (like me) then you should look in the toolbox and find a bunch of free models. Dissect them, edit them, and run them. See what happens. Change random things and then try to create something new from copy and pasting code snippets from other free models. This is how I learned. I specifically looked at the viruses associated with free models and made my own I obviously didn’t distribute the malicious scripts
If you’re more of a video person, check out the videos on the Roblox Developer Hub. These are super helpful and go over a variety of topics. There’s also some good channels for scripting on Youtube. You can just search up how to make a game and you’ll find a lot of channels.
As others are saying, look at lua.org as it does contain a lot of good references. Learning real Lua might help with Rbx Lua (even though I’ve never used real Lua so i don’t count).
The way I learn is by reading the documentation’s on the wiki. If you rather watch a video and replicate what the person is doing maybe take a look on my channel. There’s allot from small and easy to big and difficult My channel
I don’t know if I’d give the same suggestion. When you have the visual output on-screen rather than just text (i.e. “make this part red” as a way to learn how assignments work), it’s much easier to learn for most people. You’re going to be applying it in the context of Roblox anyway, so it makes sense to start working in Studio from the very beginning.
Disagree – a majority of the veteran scripters that are on the platform today learnt by doing and experimenting in Studio (and failing a lot).
OP already has background knowledge in programming in other languages, so the hub and a few simple tutorials / reference pages should suffice. No need to read entire books.
Since you already know how to program in other languages, you can apply the same ‘logic’ to roblox and use the API reference to figure out what to do.
i’d suggest that you think of a small project idea and think about how you could make it and use developer.roblox.com to learn how to do things with RBX.lua that you dont know.
but first learn basic lua syntax(it is quite similar to python)
RBX.Lua is the informal name of Roblox’s implementation of Lua 5.1.4. It is not its own language—it is ‘real Lua’. If you can program Roblox games, you can program in Lua. Learning Lua by itself will definitely help with using the language alongside the Roblox API.
Edit >2 years later: I was wrong about this. Roblox’s modification of Lua always excluded certain features like proper tail calls, making it its own modification of the language rather than implementation.
I would suggest that you watch lots of YouTube videos and just try coding things in studio.I would suggest that you watch @Alvin_Blox’s YouTube Channel. Another way that you can learn to code is by setting goals of what you want to make. For example you may think I want to make a simple loading screen, so you will keep researching and trying things out until you make one that works. This is a good way to lean because it will teach you how to overcome issues in the future and you will find you will lean a lot. If you are ever stuck on anything post it on this fourum and people will be able to help you with whatever issue you have. May I suggest you try and fix the problem yourself first as you will find you will learn more by doing it this way. Finally you can use the Developers Hub for API references and tuturials on various different things. This is only a good resoruce if you know what you are stuck on and you know what you want to learn how to do.
Tip: I would start with the basics of RBX.Lua even-though you know how to code in other languages.
I recommend to use the wiki, youtube videos, or just go through trial and error. I am not a professional programmer but I keep using these things and I keep getting better. I sometimes watch a youtuber called Alvinblox he is a good scripter and good at teaching people new to scripting. I hope this helped you!
I think the methods you use to learn Lua really depend on the kind of person you are.
I, for example, could never learn Lua by literally reading pages of documentation and books because I would be bored out of my mind However, that doesn’t mean reading documentation is the wrong approach - some people just learn better in that kind of environment, and I am not that people!
I much prefer experimenting with things, trying to make cool little games and by doing this I slowly learnt (still learning) and improved over time. When I first started out I used to take free models and look at the code inside and try to change what the scripts did. I personally have to be having fun to learn things, and so I just make whatever I feel like making - if I can’t make it I’ll research around, try and find that one useful API on the wiki or ask on the developer forum.
So, in conclusion, it really is personal preference. But if you don’t know where to start at all, why not try all the previous suggestions and future suggestion too?
Try and read lua.org.
Try to watch youtube videos.
Take a free model and change what it does completely.
Just keep trying and having fun - you’ll find what works for you in no time!
It’s a fairly basic language. If you have a background in programming, you might be able to get away with reading the Lua reference manual for 5.1 (keeping in mind Roblox has killed the io library and neutered debug and os, and that the garbage collector can’t be manipulated in Roblox) for a basic knowledge on the grammar and syntax. Otherwise, you’re better off just trying to program something in Lua! The only way to improve is to try.
A big ‘gotcha’ of Lua is that indices start at 1 instead of 0 like in most other languages. That means the first byte of a string is at position 1, and the first index of a table is at 1. You should also be aware that all values in Lua are first class, meaning you can store them as variables. There’s also no difference between an array and a dictionary in Lua (they’re both tables).
If you’re looking for sometimes dodgy but otherwise helpful scripts, open up the toolbox in studio, and insert some free models. You can take a look in scripts to help you better your understanding of how they work. This is how I started off.
Following this, you can look for specific bits on the wiki, to help you do very specialised things.