User:AdarkTheCoder/RBX.Lua Tutorial for Newbs/Lesson 0: ROBLOX Studio

This tutorial is written and maintained by adark. Send any suggestions or feedback to her!

ROBLOX Studio is where we will be doing all of our work making games on ROBLOX. Before reading the rest of this tutorial, download and open Studio and get used to its interface. Try to move around the window panes and customize your Studio. The ROBLOX Studio wiki page is a great reference if you're confused about anything.

Configuring Studio

The default interface of Studio is usable, but not the easiest to use. Personally, I use this setup, but any that you're comfortable with works:

[1] --TODO: upload images to ROBLOX wiki server.

There are four necessary panes, however: Explorer, Properties, Output, and Command Bar. Use the View menu to enable these panes, and position them however you like. A fifth pane, Toolbox, will also occasionally be used. As in the above image, I keep mine in a tab behind Explorer, but again, anything works.

Studio Settings

In the File menu, at the very bottom, are the Settings for ROBLOX Studio. Most of these you should leave with their default values, but two I suggest changing:

The default Script Editor Colors can be jarring if not physically painful after a long time looking at code, so I highly suggest using a different, darker color theme. Below are my Editor Colors, which you are free to use and tweak:


As you can also see, I have Auto Indent turned off here. I highly suggest doing so yourself. Auto Indent is a nice feature, but it comes with automatic statement completion, which, to me, is annoying at best and downright evil at worst. At least for the first few lessons, it's a better idea to do all your code formatting yourself, to get used to how RBX.Lua is 'supposed' to look, and to get in the habit of `end`ing your code blocks properly.

Creating Your First Script

Click the Baseplate image to open your first Place. This is where the real work will happen. To insert a Script, right click on `ServerScriptService`, hover over the `Insert Object` menu, and click `Script` in the menu that pops up.

This will insert a Script object, which is where your RBX.Lua will go! It will also automatically open a Script Editor tab to the newly created Script. If you have been following along so far, your Studio should look something like this:


Opening an existing Script

Click the red 'X' to close the Script Editor, and double click the Script object in your Explorer menu to open it back up.

Now, click the `Baseplate` tab to go back to the game world view, and double click the Script object again. It's not possible to open multiple 'copies' of the same Script in different Editor windows.

Naming your Scripts

When you make multiple Scripts, it can become confusing which Script does what, if they're all called 'Script'.

Create another Script. Notice how the tabs in the center pane of Studio both say 'Script', if you have both open at once. Rather than try and remember which Script is which, we can rename the Scripts to show what each does.

Click on the Script object in Explorer, and in the Properties pane, click on the Name property to change it to something else:


Notice now, the center pane shows the "Hello World!" Script Editor tab, which is the new name of our second Script, but other is still named 'Script', because we didn't change it.

You're now ready to get starting actually writing code, so continue on to the next lesson!

-- TODO: contents navbox template for this tutorial

--PLACEHOLDER: Lesson 1: Your First Script