Roblox Game Delelopment in 24 Hour

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Sa

m
pl
e
pa
ge
s
Table of Contents

HOUR 1: What Makes Roblox Special? 1


Roblox Empowers Social Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Roblox Manages User Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Roblox Enables Fast Prototyping and Iteration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Conceptualize with Ease . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

s
What’s Inside Roblox’s Engine ................................................................. 10

ge
Free, Free, Free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Unlimited Possibilities .............................................................................. 14
Express Your Own Aesthetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
pa
HOUR 2: Using Studio 19
Installing Roblox Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
e

Using Studio Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22


Working with the Game Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
pl

Translating, Scaling, and Orienting Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30


m

Snapping ................................................................................................ 34
Collisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Sa

Anchoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Saving and Publishing Your Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Playtesting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

HOUR 3: Building with Parts 43


Creating a Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Changing a Part’s Appearance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Creating Decals and Textures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

HOUR 4: Building with Physics 59


Working with Attachments and Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Building a Door . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Disabling CanCollide to Move a Player Through the Door .......................... 65
Adding Hinges and Springs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Using a Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

HOUR 5: Building Terrain 81


Using Terrain Tools to Generate Landscapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Using the Edit Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Working with the Region Tab ................................................................... 94
Using Height Maps and Color Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

s
HOUR 6: Lighting Environment 107
Properties of World Lighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

ge
Using Lighting Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Using SpotLight, PointLight, and SurfaceLight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
pa
HOUR 7: Atmosphere Environment 123
Using Atmosphere Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Customizing Skybox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
e
pl

HOUR 8: Effects Environment 141


Using Particles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
m

Using Beams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145


Sa

HOUR 9: Importing Assets 157


Inserting and Uploading Free Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Importing with MeshParts and Asset Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Importing Textures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Importing Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

HOUR 10: Game Structure and Collaboration 175


Adding Places in a Game. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Collaborating in Roblox Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Creating and Accessing Roblox Packages in Roblox Studio . . . . . . . . . . . . . . . . . . . . . . . . 184
vi Roblox Game Development in 24 Hours: The Official Guide

HOUR 11: Lua Overview 193


Using the Coding Workspace ................................................................. 193
Using Variables to Modify Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Adding Comments to Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Using Functions and Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Working with Conditional Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Understanding Arrays and Dictionaries ................................................... 203
Using Loops .......................................................................................... 203
Working with Scope .............................................................................. 206
Creating Custom Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

s
Debugging Code ................................................................................... 209

ge
HOUR 12: Collisions, Humanoids, Score 215
Introduction to Collisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
pa
Detecting Collisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Introduction to Humanoids. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
e

HOUR 13: Interacting with GUIs 235


pl

Creating GUIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236


Basic GUI Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
m

Coding Interactive GUIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244


Tweening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Sa

Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Making a GUI Countdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

HOUR 14: Coding Animation 257


Working with Position and Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Moving Objects Smoothly with Tween ..................................................... 265
Moving an Entire Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268

HOUR 15: Sounds and Music 273


Creating a Soundtrack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Importing Music and Sound Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Creating Ambient Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Triggering Sounds Using Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Grouping Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Contents vii

HOUR 16: Using the Animation Editor 285


Introduction to the Animation Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Creating Poses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Saving and Exporting Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Easing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Working with Inverse Kinematics ........................................................... 293
Animation Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Working with Animation Events ............................................................. 298

HOUR 17: Combat, Teleporting, Data Stores 305

s
Introduction to Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

ge
Teleportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
TeleportService ...................................................................................... 318
Using Persistent Data Stores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
pa
Data Store Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Protecting and Responding to Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
e

HOUR 18: Multiplayer Code and the Client-Server Model 331


pl

The Client-Server Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331


What Are RemoteFunctions and RemoteEvents? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
m

Server-Side Validation ............................................................................ 337


Teams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Sa

Network Ownership. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341

HOUR 19: Module Scripts 345


Getting to Know the Module Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Understanding Client-Side Versus Server-Side Module Scripts . . . . . . . . . . . . . . . . . . . . . 349
Using Module Scripts: Game Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

HOUR 20: Coding Camera Movements 357


Introduction to Cameras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Coding a Camera Move. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Using the Render Step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Offsetting the Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
viii Roblox Game Development in 24 Hours: The Official Guide

HOUR 21: Cross-Platform Building 371


Improving Game Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Improving Your Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Making Your Game Mobile-Friendly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Console and VR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381

HOUR 22: Global Community Building 385


Introduction to Localization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Global Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Privacy Policies: GDPR, CCPA, and You. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

s
HOUR 23: Monetization 395

ge
Game Passes: One-Time Purchases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Selling Your Game Pass in Game. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
pa
Developer Products: Consumables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Roblox Premium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Developer Exchange: Earn Real Money from Your Game . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
e

HOUR 24: Attracting Players 409


pl

Game Icons, Thumbnails, and Trailers .................................................... 409


Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
m

Advertising and Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414


Sa

Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

APPENDIX A: Lua Scripting References 425


Modifying Properties That Are Data Type and Enumerations . . . . . . . . . . . . . . . . . . . . . 425
Conditional Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Expanding Lua Knowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428

APPENDIX B: Properties and Functions of Humanoid 429

Index 433
HOUR 2
Using Studio

What You’ll Learn in This Hour:



How to install and launch Roblox Studio

s

How to use Studio templates

How to navigate game editor

ge

How to create a part

How to translate, scale, and orient parts
pa

How to save and publish your project

Playtesting
e
pl

Now that we’ve explored the culture and features that make Roblox special, you can start to
unleash your creativity with Roblox’s free game engine, Roblox Studio. Roblox Studio is a play-
m

ground for developers to create, share, and play their games on the Roblox website. What’s
great about this platform is that you can easily build everything from volcanic islands to urban
cityscapes and then drop a character into that world to immediately start playing. Imagine a
Sa

huge playground filled with all the tools you need to build imaginary worlds—that’s Roblox
Studio.

In this hour, you’ll learn how to install Studio, and then you’ll learn how to use Roblox Studio
with the help of templates. You’ll also learn how to arrange your workspace to hold objects in
the 3D world, the difference between saving and publishing your project, and finally how to test
your game before publishing it to the public.

Installing Roblox Studio


We’ve explained how Roblox Studio is a free and immersive platform for game developers to
build different terrains, cities, buildings, race games, and much more. You don’t need years of
coding experience or a degree to make fun games; all you need is your imagination and hands-
on learning in the Roblox Studio. Roblox Studio is extremely intuitive to use. Because Roblox is
cross-platform, developers can install Studio on both Windows and Mac systems.
20 HOUR 2: Using Studio

Use the following steps to install Studio:

1. Go to https://www.roblox.com/create.

2. Click Start Creating and then click the Download Studio button in the pop-up window.

3. Navigate to the folder where you have downloaded Studio and double-click the file to
install it.

NOTE
System Requirements
For Roblox Studio to run efficiently, there are some OS/hardware specifications:

s
 Roblox Studio cannot run on Linux, Chromebooks, or mobile devices such as smartphones.

ge
 A Windows computer with at least Windows 7 installed, or a MacBook with version
macOS10.10.
 A minimum of 1 GB of system memory.
pa
 Internet access to download Studio and updates. It also lets you save projects (publish) to
your Roblox account.
For an enhanced Studio experience, you should also have these things (not mandatory):
 A mouse with a scroll wheel, preferably a three-button mouse.
e

 A video card that’s dedicated and not an integrated card.


pl
m

Troubleshooting the Installation


If you’ve followed the necessary steps to install Studio but you’re experiencing installation con-
Sa

flicts, there are a few things you can do to troubleshoot the errors:

 If you’ve added new hardware or drivers recently, remove and replace the hardware to
determine if it’s causing the problem.

 Run diagnostics software and check information on troubleshooting the operating system.

 Restart the computer.

 Uninstall and delete all the Roblox files and reinstall the latest Studio again, if required.

If you are still finding errors, you can also reference the Roblox Support forums online for addi-
tional tips.
Installing Roblox Studio 21

Opening Roblox Studio


Once you are done installing the Roblox Studio, you need to open it:

1. Double-click the desktop icon if you are on Windows or click the Dock icon if you are on a
Mac to open a login window (Figure 2.1).

2. Enter your Roblox username and password.

3. Click the Log In button.

s
ge
pa
e
pl
m
Sa

FIGURE 2.1
Roblox Studio login window.

Once you are logged in, you see a page with different templates and a menu sidebar with New,
My Games, Recent, and Archive (Figure 2.2).

The following sections provide a quick introduction to these templates and the rest of Studio;
then you can begin experimenting with the utilities of Studio.
22 HOUR 2: Using Studio

s
ge
FIGURE 2.2
Roblox Studio home screen.
pa
Using Studio Templates
e

When you first open Roblox Studio, under New, you see three tabs: All Templates, Theme, and
Gameplay. Templates are prebuilt projects, and you can use them as a guide to build your own
pl

game world.
m

All Templates
Sa

The All Templates tab (Figure 2.3) is a combination of the Theme and Gameplay tabs. You can
use these templates as a start for your games. For example, if you’re building a medieval game,
the Castle theme is equipped with feudal details, or if you want to build an interactive obby, you
can build off the Obby gameplay template. Two simple templates are a good place to start:

 Baseplate: This is a popular choice to start with. The baseplate itself is easy to delete, leav-
ing a blank canvas to work with.

 Flat Terrain: Has a flat plane of grass terrain instead of a baseplate. You can modify or
clear the terrain using the terrain editor.
Using Studio Templates 23

FIGURE 2.3

s
Roblox Studio home screen lists various templates available, such as simple templates Baseplate and Flat
Terrain.

Themes
ge
pa
Themes are a combination of gameplays and more, and together they make a new world. It sets
a mood for your game—for example, a space combat game will have asteroids and other galac-
tic components. Roblox provides some prebuilt themes that are ready to use and modify however
you would like. As you explore the game world, descriptions point out its use case or features,
e

including tips on how the effects were created in case you want to re-create them yourself.
pl

An example of a prebuilt theme is Village (Figure 2.4). You can explore the houses in the village
and move along the pathway through the town, which leads you to a river, a bridge, and finally
m

the dock, across which you can see small islands.


Sa

FIGURE 2.4
Example of a prebuilt Village Theme available in Studio.
24 HOUR 2: Using Studio

Gameplay
Some templates include interactive gameplay. For example, this can include Team Deathmatch,
Control Points, Capture the Flag (Figure 2.5), and more. A great thing about these templates is
that developers can take them apart and extract any specific facet that they want—for example,
using in-game radar or team spawn points. These templates help with components such as what
a player can do in a game, what the goals are, and how a game can be modified.

s
ge
pa
e
pl
m

FIGURE 2.5
Example of a prebuilt Capture the Flag gameplay template.
Sa

Working with the Game Editor


Now that we’ve familiarized ourselves with Studio’s homepage, let’s click on the Baseplate tem-
plate to get started. This opens the game editor (Figure 2.6).

The game editor is, as the name suggests, a place where you can create, modify, or test your
game. At the top of the game editor, you see different tabs on the menu bar (Figure 2.7).
Working with the Game Editor 25

s
FIGURE 2.6

ge
The game editor enables you to create, modify, or test your game.
pa
FIGURE 2.7
Roblox Studio menu bar.
e

 Home tab: A concise tab of all the features that are frequently used. These features are on
the Home tab for easy access.
pl

 Model tab: Has more building tools apart from move, scale, and rotate. It’s also where you
m

can create spawn locations and special effects such as fire and smoke.

 Test tab: Helps for testing your game. There are two options underneath: Run and Play.
Sa

Run will run a simulation of what will happen to the bricks and surrounding elements,
and Play will let you play your game.

 View tab: Lets you toggle the different windows available in the Roblox Studio. If you need
to use a window that is closed, you can find them under the View tab.

  
The main windows are Explorer and Properties, which are discussed detail in later in
this section.

  
The Actions section has several display features. You can take screenshots or record
videos here and also toggle between full screen and windowed views.

 Plugins tab: An add-on to Studio. These are generally not included by default. Plugins
add new custom behavior and features. You can either install plugins made by the Roblox
community or create your own plugins.
26 HOUR 2: Using Studio

Below the menu bar is a ribbon bar (Figure 2.8). The tool options change as you move between
menu bar tabs.

FIGURE 2.8
Roblox Studio ribbon bar.

In the following sections, we explain some of the editor’s basic features and most frequently used
features and discuss how to prepare your project for publishing on Roblox.

s
Arranging the Game Editor Workspace

ge
Since this is the first time you are opening the game editor, extra windows that you don’t require
right now will automatically open on the left side. To organize the workspace in an optimal
way, close the extra windows so you have more space to create.
pa
By default, the Explorer and the Properties windows will be open (Figure 2.9), aligned one
beneath the other on the right side.
e
pl
m
Sa

FIGURE 2.9
Workspace arrangement with the Explorer and Properties windows one below the other.
Working with the Game Editor 27

NOTE
Some Features of the Game Editor Workspace
The next time you relaunch Roblox Studio, your workspace arrangement remains intact. It is a one-
time fix, unless you undo your arrangement.
When the Property window undocks, it gets difficult to dock it back below the Explorer window. It
either docks itself aside or over the Explorer window. To fix this, undock both the windows and close
them. Go to the View tab, open the Explorer window, dock it on the right-hand side, and then close
it. Do the same with the Properties window and close it. After all this, reopen the Explorer and then
the Properties window. This will align them one above the other.

Working with the Explorer Window

s
The Explorer window is the hierarchical representation of all the objects used in your game. It

ge
is the most crucial window because it lists all the organizing, viewing, and testing features of a
Roblox game.
pa
It uses the concept of parenting to organize all the objects. The object Game is hidden at the top
of the hierarchy. For example, in Figure 2.10, you can see Workspace parent has the following
children nested underneath: Camera, Terrain, and Baseplate.
e
pl
m
Sa

FIGURE 2.10
Objects nested under Workspace in the Explorer window.

If you want to create more child objects, you can hover over Workspace and click the plus sym-
bol to the right (Figure 2.11). This will list all the objects that you can create. You can also drag
and drop it into the desired parent object.
28 HOUR 2: Using Studio

s
ge
FIGURE 2.11
Add more children to your Workspace.
pa
One of the most important children you will work with is a part, which is the foundational
building block of Roblox. These physical 3D objects are also known as bricks, and when they are
in the Workspace, they can interact with each other.
e
pl

Creating a Part
To create a part, from the Home tab, navigate to the Insert menu in the ribbon bar and click
m

Part (Figure 2.12).


Sa

FIGURE 2.12
Create a part.

A part will appear at the exact center of your camera view (Figure 2.13). Use the camera con-
trols shown in Figure 2.14 to move your camera, rotate the view, and zoom in and out.
Working with the Game Editor 29

FIGURE 2.13
Part appears in your baseplate and in your Explorer.

s
ge
pa
e
pl

FIGURE 2.14
Camera controls.
m

To give your new part a name, do the following:


Sa

1. Double-click the part in your Explorer window.

2. Rename the part. Roblox convention is for parts to be named in PascalCase, which means
the first letter is capitalized—for example, EndZone or RedBrick.

Note that your name can contain spaces, but we won’t use spaces at this point in case we want
to be able to access the part via code later.

You can use the Explorer to select and work with parts even if you can’t see them in the game
editor window.

Working with the Properties Window


When you add a part to your Workspace, you’ll notice the Properties window (Figure 2.15) fills
with information.
30 HOUR 2: Using Studio

FIGURE 2.15
The Properties window lists all the details about the newly added part.

s
Like any object, a part has properties such as size and color, and the Properties window shows all

ge
these details about how an object looks and behaves. In the next chapter, we’ll go into further
detail about properties of a part and how you can manipulate them.
pa
Translating, Scaling, and Orienting Objects
You’ve learned how to create a part; now you can make it move! In Roblox Studio, it is possible to
e

move (translate) and rotate (orient) objects in the scene. There are multiple ways to get the same
results, but in this section, we will solely use the Roblox Studio default tools and keyboard shortcuts.
pl

There are two settings you can use to get greater control when moving parts: snapping and collisions.
m

 Snapping is the amount a part will move, scale, or rotate at a time. Snapping is useful
when creating items that need to be exactly aligned, like how walls of buildings need to be
Sa

at 90-degree angles.

 Collisions happen when two objects (or rigid bodies) intersect or get within a certain range
of each other.

Because these two settings are most used when playing with two or more parts, turn them off for
now while you freely move a single part around. Later, you’ll turn them back on when we discuss
how they work.

 To turn OFF snap: In the Model tab, uncheck the box next to Rotate or Move (Figure 2.16).

FIGURE 2.16
Turn off snap.
Translating, Scaling, and Orienting Objects 31

 To turn OFF collisions: In the Model tab, collisions are on if the button is highlighted
gray. Click the Collisions button to toggle it off (Figure 2.17).

FIGURE 2.17
Turn off collisions.

Translating

s
ge
Now you can freely start translating, or moving, objects. Go to the Model or Home tab and click
the Move icon (Figure 2.18). pa
e
pl

FIGURE 2.18
Move tool.
m

Now, a gizmo should appear on the selected objects. When you click, hold, and drag one of the
arrows, the object moves along that axis (Figure 2.19).
Sa

FIGURE 2.19
Moving the gizmo.
32 HOUR 2: Using Studio

Scaling
To scale objects, go to the Model or Home tab and click the Scale icon (Figure 2.20).

FIGURE 2.20
Scale tool.

The gizmo should appear again, this time with orbs on selected objects. When you click, hold,

s
and drag one of the orbs, the object scales along that axis (Figure 2.21).

ge
pa
e
pl

FIGURE 2.21
Scaling a gizmo.
m

If you want to scale on two sides simultaneously, hold Ctrl (Windows) or Command (Mac) while
Sa

clicking, holding, and dragging one of the orbs.

If you want to scale while keeping the current proportions, you can do so by holding Shift while
scaling.

Rotating
To rotate objects, go to the Model or Home tab, and click the Rotate icon (Figure 2.22).

FIGURE 2.22
Rotate tool.

You might also like