Whether you’re a gaming enthusiast, fledgling programmer or just someone looking for a side hustle, Roblox might just be the answer for you. Seeing Roblox Studio, with all its bells and whistles for the first time, can be quite overwhelming. However, as with learning most things in life, it’s easier to get started by breaking it down and taking it one step at a time.
Conveniently, Roblox offers several templates that anyone can use to kick-start their game world. This article takes you through the basics of Roblox development — what a Part is, Part properties and your very first script. It assumes that you’ve already registered for an account and have Roblox Studio installed on your machine.
Begin by selecting “Flat Terrain” under the “All Templates” tab. Control wise, use the WASD keys to move around while in the studio, along with your right mouse button to pan the camera around. In this first hour, take some time to familiarize yourself with some of the attributes that parts in Roblox have, and how you can make use of them.
Think of a part as a physical object, subject to the laws of physics. Parts in Roblox (by default) will fall to the ground, move when pushed and will prevent a player from walking right through them. Using the 4 different types of parts: Blocks, Spheres, Cylinders and Wedges, combined with clever manipulation by scaling (resizing) and rotating the part, these will form the initial building blocks of your game.
Challenge 1 —Navigate to the Home or Menu tab and you’ll find the Select, Move, Scale, Rotate and Part options on the menu bar near the top of your screen. For now, create a nice square cube.
Now that you have your cube created, let’s take a look at how it’ll look when the game is running. Play testing is a vital step in the making of any game, since it helps unearth bugs that you might have missed when coding the game. An obby (obstacle course) for example, would be a terrible game if there was no way to jump across the lake of deadly lava.
To play your game, let’s first place a spawn point near whatever it is that you’d like to test. On the Model tab in the menu bar, you’ll find the spawn icon which creates a fancy looking block that’ll designate where your character is created when you start the game. In this case, place the spawn point near your newly created cube and hit F5 (or find the Play button in the home tab up on the menu bar) to play your game!
Challenge 2: Play test your cube. Remember how parts in Roblox are subject to the laws of physics? Push your cube with your character and watch it move. Did you create your cube in the air? Notice how it’s now dropped to the ground. Maybe rescale it into a rectangle and watch it topple to the ground when your character collides with it. Come back once you’ve played with your cube a little.
Hopefully you’re already realizing how useful the Roblox studio can be. In just a few minutes, you’ve already created a game that has an animated player character that moves around the map, a fully functioning physics engine and an object in the game that interacts with the player. Impressive isn’t it?
But that’s not all Roblox has to offer. Just like in real life, where a cube can be made of rock or plastic, can be green in colour or red, parts in Roblox have various properties associated with them that we can tinker around with. Unlike real life, we can also choose to make a part defy gravity, or make it such that a player can walk right through it.
Back in the Roblox studio, (hit stop on the menu bar if you’re still testing your game), click on your cube and check out the bottom right corner of your screen. Here you’ll find all the different properties associated with the cube. Scroll down slightly and you’ll find a checkbox called “Anchored”, which allows you to affix a part in space. Want a part to permanently stay in the air without falling or on the ground without moving? Anchoring the part is how we achieve this.
Challenge 3: Change the colour of your cube, it’s material and as a bonus challenge, make it such that a player can walk through the cube instead of crashing into it. Experiment with the different properties and see how they affect your cube in the game.
So you’ve created your part and even manipulated it in several different ways by changing its properties. At this point, you’ve already got the basic building blocks to go away and build your first game, e.g.: A maze where the player that finds their way out first wins.
But before you leave, it would be remiss of me not to show you the world of possibilities that open up when you add coding to the mix. Coding in Roblox uses a programming language called Lua, and covering it will be several articles in itself. Having said that, coding is a great way to take your game to the next level, and in my opinion, the most satisfying thing about building a game. Again, let’s take it one step at a time and get started with a simple script.
We’ve seen how you can change the properties of your cube in the Roblox studio. But what if you could change the cube’s properties while in the game? For this example, you’ll be writing a script that changes the color of your cube whenever your character touches it.
First, you’ll need to locate the part that we intend to add the script to. On the right of your screen, just above where you found the properties to your cube, you’ll find the Explorer. This is a list of all the different bits and pieces of your game and if you’ve been following this tutorial, there should be a “Part” under the “Workspace” drop down. Don’t worry too much about all the different entries here for now, we’ll come back and cover them in later articles. Alternatively, you could also have selected your cube on the map and this would have automatically highlighted the cube’s part in your Explorer.
Hover your mouse over the part in the Explorer and there’ll be a + symbol to click. Once again, be amazed and excited about all the different options there are here, but don’t feel stressed about having to learn all of them now. For now, select “Script”, delete the default line of code that is automatically generated in the window that pops up and copy in this block of code below.
local cube = script.Parentcube.Touched:Connect(function (partTouched) cube.BrickColor = BrickColor.Random()end)
Now hit play and test it out! We’ll cover what each line of code means in the next article, but for now touch your cube with your character and watch the color of the cube change. Then think of all the different puzzles, traps and hidden treasures you can start including in your game by controlling part properties while in the game.
Phew! That was a lot of information to take it so congrats for making it this far. Hopefully that gave you a quick introduction to Roblox and the different functionalities that you can leverage in Roblox Studio.
If you’re completely new to Roblox, take some time to get a feel for what a completed game in Roblox COULD offer. Join some of the most popular ones and just spend a couple of minutes figuring out what makes the game so good. Not only will it give you a better idea of all the different things you could build in Roblox, but also a general sense of the currently popular themes and what you need to make your game a huge hit.
In the next article we’ll dive deeper into the wonderful world of Lua. See you then!