I recently finished learned normal lua, now I have to learn rlua. What do I have to learn in order to be competent in rlua.
Roblox lua is just a modified version of lua. You’d want to visit https://developer.roblox.com to make yourself familiar with scripting in lua and etc.
Is there any article that I must read?
You can try these:
You can use the site’s search filter to help you if you’re looking for more information
All the syntax is identical to the matching version of Lua. The API has just been expanded and the reference is accessible through developer.roblox.com. Beyond that, there’s not much more you need.
I feel like a misconception is that you have to learn absolutely everything there is to learn about Lua in order to be a good programmer. While it’s great that you “finished” Lua, practicing how to solve an actual problem using code will help you much more in the long run than simply memorizing syntactic sugar or specific metamethods and whatnot. There’s no definite list of what you have to read to be a “real” coder, and what’s more important is the way you go about trying to find a solution to something. While you will definitely need to know the syntax, it isn’t super important to memorize every tiny little quirk Lua has to offer since that’s what the documentation is for. If you get lost and the documentation feels like too much, Roblox has plenty of tutorials and I’ve put together a quick description of what makes Roblox different from vanilla Lua:
About Enums
Regardless of that, there are still some things that make Roblox distinct from vanilla Lua that you should be aware of. The Enum library allows developers to specify certain things without using an arbitrary string. For example, instead of setting a Part’s material to the string “Plastic”, you can set it to Enum.Material.Plastic
Roblox also has a whole set of globals that’s separate from vanilla, the most important of which I would consider to be, entirely subjectively, game
, script
, and require
.
About Instances
Now, the main part of Roblox: having visuals (beyond just printing to the output, obviously). Roblox handles this through classes which have certain behavior ranging everywhere to storing code (a LuaSourceContainer) to stopping two things from colliding (a NoCollisionConstriant). Knowing every single class and exactly what it does isn’t terribly important, but you should know at least the basics of UI (everything inheriting from GuiBase2d) and 3D graphics (everything inheriting from GuiBase3d, PVInstance, and also a lot more). To manipulate many of these instances’ properties, you’ll need to use Roblox’s custom DataTypes as well as the basic ones you’ve already learned from vanilla.
Beyond learning the basics, growth really just comes down to practice. Find a project you are interested in and work on it until you get to a point you’re satisfied with. If you get stuck on something, try looking it up. The DevForum has a lot of great resources in #resources to help you apply general concepts specifically to Roblox, whether it’s through a useful module or a helpful tutorial. If you can’t find an answer that’s already online, you can always just ask us here if you get confused on something or aren’t sure how to approach something.
As @Raretendoblox said, Roblox Lua is really just a modified version of Lua. Leaning Roblox Lua is really just getting a grap of Roblox Studio in script form. You’ll want to look over properties, functions and events of Roblox’s in-built classes, as well as the Roblox’s global functions, and Roblox’s Enum classes. The easiest thing to start with will probably always be a Part
.
https://developer.roblox.com is a great resource.
Thank you so much for your well made answer!
Do you have an good tutorial on the roblox wiki I can start with? I find that making a obby is too boring to me.
If you already know Lua then there’s almost nothing left to learn to know how to write it in Roblox. The important part is learning the Roblox API, which has nothing to do with Lua itself. Documentation and tutorials are present on the wiki.