How to Make a Room in Roblox.
by tearsofthekingdom in Living > Video Games
719 Views, 0 Favorites, 0 Comments
How to Make a Room in Roblox.
I made a locked room with various items inside of it. Here's how you can do the same!
Supplies
All you need to start making this is:
Roblox Studio
(preferrably) a Gap Fill plugin, but it's not mandatory.
Building Your Door.
This doesn't have to look exactly how mine looks, so involve some creativity if you want.
First, you should start off with the door. Create a block around the size of (12.6, 1.6, 6.9), but make sure to adjust it later to fit the size of your future room. Next, imput a negative block and make the size (10.7, 1, 5.5). It should look like this so far.
Next, unionize the two blocks together. That's the silver outline of the door I showed you earlier, next we have to make the dark wooden parts. Imput a block in the middle of the empty space, then make it Reddish Brown (105, 64, 40 on the colour wheel). Now that you have the colour, imput these values for the size (10.8, 0.7, 5.5). It should look similar to the second image right now.
We're almost done this part! Now, all you have to do is build the window. Place a part higher up on the door, and make sure the size is (4.5, 0.5, 4.9). Like you did earlier for the door, imput a negative block in between in it to create an outline. The negative blocks size should be (3.841, 0.33, 4.081). Before you unionize it, check the third image to see if it looks similar.
Now, all that's left is to create the window effect. After unionizing the frame of the window, imput a part inside of your outline like before, and make the size values (3.841, 0.23, 4.081). After that, make the parts material "Glass" and the transparency 0.5.
After you do that, make sure your door's parts are made out of "Wood", not "Wood Planks". Now you're free to group all of your pieces together to look like the fourth image and anchor your door.
If your room won't be the same dimensions as mine, feel free to adjust the size as you see fit.
Building Your Room
Now that you're done your door, it's now time for the actual room. Keep in mind that people are gonna actually play in here and it's not just a showcase, so adjust the size to make it less empty in the end.
All you really have to do is make a thin box, with one side empty like the first image. If you need help making it thin, go into the "Model" tab in Studio and change the "Move" tab to 0.1 studs. After this, move your previously made door on the empty side of the room. This is where you'd bring out your gap fill plugin to fill in the gaps on each side of the door.
If you don't have a plugin for that, just fill in the gaps using thin parts and in the end it should look like the second image. Make sure to anchor your room so it doesn't fall apart, and change the material for all the parts to "Wood". Now, you can make the colour anything you want, but I made it Brown (124, 92, 70 on the colour wheel) to create a more realistic feel.
Making Your Items
Instead of building each and every item from the locked room, it's time to show your creativity! Before we do that, some people who are reading this might not know how to build an item to begin with, so let's start with that.
Let's begin. First place a part into the workspace, then lift it slightly using the move tool. This can help you look at the size and build the object properly. Now, size it up using the scale tool and by grabbing the green dot above the object. Now, place a part right on top of your previous one. Instead of scaling it, click back onto select and place your cursor around your parts. Hold down a left click on your mouse and move the blue box over both parts. After you're done that, hit Crtl + G. Congrats, you just made a group! Now if you click rotate, you rotate the group of parts instead of only one.
If you feel like the amount of studs [the measurement system in Roblox] your group is moving by or the rotation options are too big, you can adjust them also. If you look to the right of the screen, you can see two checkboxes that have rotate and move beside them respectively. Make sure they're clicked and blue, so the numbers you imput on the side of it actually happen. Now, this is just personal preference but making your rotation 15 degrees and your studs 0.1 allow for the best range of motion. Now you can make as many items as you want in this locked room, just make sure they're anchored!
Coding Events
(Please keep in mind that you don't have to do the previous section to this one, and instead can apply this knowledge onto your own parts!)
It's finally time to do some coding! You're now getting into a part where you have to pay attention to all steps, because these codes can fall apart if you're not careful. These coding events are ProximityPrompt activated, which means when a player clicks a key at a certain distance, a ScreenGui will pop up for a few seconds.
First things first, make sure you have Explorer and Properties. If you don't have these already, head into View and click on both of them. After you do this, click on your part and open it using the tiny triangle at the corner, it'll show you the two parts we made last section. Click on the top part in Explorer and keep your cursor around the name, there should be a plus sign next to it. Click that and insert a ProximityPrompt. You can adjust the name of the object if you want in Properties, but make the hold duration 1 second. You can leave this proximity prompt alone for now.
Now it's time to make a ScreenGui. In Explorer, head down to StarterGui and insert a ScreenGui the same way you did the ProximityPrompt. This is gonna be the holder for our frame, which you should also insert inside the ScreenGui. It should show up as a white block in the left corner which you can adjust on the screen to your fitting. The looks of the Frame shouldn't matter, all that matters is that it's there. This is optional, but place a TextBox inside your frame too and write some text in there if you want.
Now that we have those two set up, it's time for the more complicated parts. Go into ReplicatedStorage and place a RemoteEvent inside. This RemoteEvent is the key to making a ProximityPrompt work, think of it like the brain of the operation. After you're done with setting it up, you can finally start your coding. Go back to your Part that you attached the ProximityPrompt to and insert a script inside it too. Copy and paste these lines of code into your script, but if you changed the name of the RemoteEvent earlier then change the name in the code accordingly:
local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local prox = script.Parent.ProximityPrompt
prox.Triggered:Connect(function(player)
RemoteEvent:FireClient(player)
end)
Go back to your ScreenGui that you made earlier and insert into your Frame a local script this time. Keep in mind the same thing I told you earlier for these codes, and copy and paste this into your local script:
local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent")
RemoteEvent.OnClientEvent:Connect(function()
script.Parent.Frame.Visible = true
wait(3)
script.Parent.Frame.Visible = false
end)
And you're done! Just make sure that your ProximityPrompt's parent is not an attachment nor a group, but instead a part. Also make sure that it's on a part visible to the player if they walked up to it. As the final touch, unclick Visible on your Frame so the script works perfectly.
SurfaceGUI
(Like before, keep in mind you can adjust any of the settings as you see fit. This is also optional to do, as it's only for people who are making the same sign on the cabinet I had. Unless you're making something that uses this, feel free to skip it.)
We've finally approached the end of this tutorial, and it's a really simple finisher. To create a SurfaceGui, go back to StarterGui and insert one the same way you did with the ScreenGuis. If you scroll down on the properties of the SurfaceGui, you'll see an 'adornee' box there. This is what decides where your text is gonna be on. Click on the box and scroll in Explorer until you find the part you want it on, and click on it. Do not make a group an adornee, but instead the parts inside of it. After you're finished that, insert a TextBox inside your SurfaceGui then change the face of the TextBox to whatever side your part is facing in the properties of the SurfaceGui.
We're finally done! Although I didn't describe all the items I built, these are the core basics of building the locked room I made in Roblox. I hope it was helpful to you.