Reading time: ~35 minutes
Table of Contents
- Roblox Studio Basics
- The Instance Hierarchy
- Important Services
- Data Types
- Tags System
- Client-Server Architecture
- Replication
- Streaming
- Working with the Workspace
- Studio Workflow with CORP
Roblox Studio Basics
Roblox Studio is the development environment for creating Roblox games. It provides a 3D editor, scripting environment, and testing tools.Key Concepts
- Place: A Roblox game world/level
- Experience: A published game (can contain multiple places)
- DataModel: The root container for all game objects
- Instance: Any object in the game (Parts, Scripts, Models, etc.)
Opening Your Project
- Open Roblox Studio
- Create a new place or open an existing one
- Your compiled CORP code will be synced to the game using roblox-ts
The Instance Hierarchy
Everything in Roblox is an Instance - a hierarchical object with properties and methods. Instances form a tree structure called the DataModel.Common Instance Types
Containers
Parts and Models
Scripts
UI
Hierarchy Example
Important Services
Roblox organizes core functionality into Services - singleton instances that manage specific aspects of the game.Essential Services
Workspace
The 3D world where visible game objects exist.Players
Manages connected players.ReplicatedStorage
Storage accessible by both server and client. Use for shared assets and modules.ServerStorage
Server-only storage. Clients cannot access this.ServerScriptService
Where server Scripts execute.RunService
Access to game loop and environment checks.Data Types
Roblox has unique data types for 3D game development.Vector3
Represents a 3D point or direction.CFrame
Represents position AND rotation (Coordinate Frame).Color3
RGB color with values from 0 to 1.Other Important Types
Tags System
Roblox’s CollectionService allows you to tag instances. CORP uses tags extensively to identify GameObjects and scene roots.Installing Tag Editor
- In Roblox Studio, go to Plugins → Plugin Marketplace
- Search for “Tag Editor”
- Install the official Tag Editor plugin
Using Tags
CORP Tags
CORP recognizes these special tags:GameObjectSceneRoot: Marks the root folder of a scene in Workspace
Adding Tags in Studio
- Select an instance in the Explorer
- Open the Tag Editor plugin (View → Tag Editor)
- Type the tag name (e.g., “GameObjectSceneRoot”)
- Click the + button or press Enter
Client-Server Architecture
Roblox games use a client-server architecture. Understanding this is crucial for multiplayer games.The Server
- Authoritative: Makes final decisions about game state
- Validates: Checks client inputs for cheating
- Manages: Game logic, physics, NPC AI
- Runs:
Scriptinstances inServerScriptService
The Client
- Displays: Renders the game world
- Inputs: Captures player input (keyboard, mouse, touch)
- Predicts: Can predict movement for responsiveness
- Runs:
LocalScriptinstances in player-specific locations
When Code Runs Where
CORP’s Approach
CORP abstracts some of this complexity:- NetworkObject: Automatically replicates GameObjects
- NetworkBehavior: Components that sync state
- RPC: Easy server-client communication
- Authority Models: Choose server or client authoritative
Replication
Replication is how Roblox syncs game state between server and clients.What Replicates
✅ Automatically Replicated:- Instances in Workspace
- Properties of replicated instances (Position, Size, Color, etc.)
- Instance hierarchy changes (parenting)
- Local variables in scripts
- Instances in ServerStorage or ServerScriptService
- Client-created instances (unless parent is replicated)
Replication Direction
CORP’s Network System
CORP handles replication for you:RemoteEvents and RemoteFunctions
Roblox’s built-in communication system (CORP’s RPC system uses these internally):Streaming
StreamingEnabled controls whether the entire game world loads at once or streams in based on player location. CORP is designed to work seamlessly with streaming enabled.Streaming Modes
StreamingEnabled = false
- Entire world loads immediately
- Best for: Single-player games, small maps, client-authoritative games
- Memory: Higher memory usage (entire map loaded)
- Performance: Consistent, but limited by total content size
StreamingEnabled = true
- World streams based on player position
- Best for: Multiplayer games, large open worlds, server-authoritative games
- Memory: Lower memory footprint per client
- Performance: Better for large-scale games
CORP’s Streaming Support
CORP is fully compatible with StreamingEnabled. It provides built-in tools to handle streaming gracefully:NetworkObject Streaming Awareness
InstanceNetworkVariable
For networked Instance references, CORP providesInstanceNetworkVariable which handles streaming automatically:
Recommended Settings
For Multiplayer Games (Recommended: StreamingEnabled = true)
For Single-Player Games (StreamingEnabled = false)
Setting Streaming
In Roblox Studio:- Select Workspace in Explorer
- In Properties panel, find StreamingEnabled
- Set based on your game type:
- true for multiplayer/large worlds
- false for single-player/client-authoritative
Client-Authoritative Games
Important: For client-authoritative games,Client-authoritative mode requires the full game state to be available on the client, which is incompatible with streaming.Workspace.StreamingEnabledmust be set tofalseto ensure all game content loads immediately. See Unreal System - Authority Models for details.
Working with the Workspace
The Workspace is where your 3D game world exists.Basic Operations
Workspace Organization
Organize your Workspace for CORP:Studio Workflow with CORP
Recommended Development Flow
-
Set Up Development Tools
- Install VS Code
- Install VS Code extensions:
- Download and install Rojo Studio Plugin (Rojo.rbxm)
- Place in
%LOCALAPPDATA%\Roblox\Plugins(Windows) or~/Documents/Roblox/Plugins(Mac)
- Place in
-
Set Up Project
- Clone CORP-TEMPLATE
- Initialize submodules:
git submodule update --init --recursive - Install dependencies:
npm install - Configure Gamepacks in
GAMEPACKS/folder
-
Start Development Servers
- Terminal 1: Start Rojo server
- Terminal 2: Watch TypeScript compilation
- In Roblox Studio: Click Rojo plugin → Connect to
localhost:34872
- Terminal 1: Start Rojo server
-
Code in TypeScript
- Write components in your Gamepack’s
src/folder - Export components in
exports/components.ts - Save files to auto-compile and sync to Studio
- Write components in your Gamepack’s
-
Build Scenes in Studio
- Create Folders and Actors in Workspace
- Tag the scene root folder with
GameObjectSceneRoot - Add
$componentsfolders to Actors for component configuration
-
Test in Studio
- Click Play (F5) to test
- Check Output window for prints and errors
- Iterate on code and scene design
- Changes sync automatically when you save TypeScript files
-
Export Assets
- Place models, sounds, UI in your Gamepack’s
assets/folder - Reference with
%assets%/path/to/asset
- Place models, sounds, UI in your Gamepack’s
Component Configuration in Studio
CORP stores component data inside a special$components folder within each Actor. Here’s the proper hierarchy:
Creating Component Configuration
Method 1: ModuleScript (for complex configuration)- Select your Actor in the Explorer
- Insert a Folder and name it exactly
$components - Inside
$components, insert a ModuleScript - Name it with your component’s mapping name (e.g.,
player_controller) - Set the ModuleScript content to return a configuration table:
- Inside the
$componentsfolder, insert a StringValue - Name it with your component’s mapping name (e.g.,
enemy_ai) - Set the Value to a JSON string:
Component References
To reference other instances, GameObjects, or components, add ObjectValue children to the component and use theData.factory methods:
Data.factory reference type:
$referenceId must match the name of the ObjectValue child. CORP will resolve the ObjectValue to the actual Instance/GameObject/Component based on the $type.
Testing Workflow
Hot Reloading with Rojo
With Rojo and roblox-ts watch mode running:- Save your TypeScript file in VS Code
- roblox-ts compiles automatically (Terminal 2)
- Rojo syncs changes to Studio (Terminal 1)
- Stop and restart the play session to see changes
- ✅ Real-time code synchronization
- ✅ No manual file copying
- ✅ Work in your favorite code editor
- ✅ Version control friendly (edit source, not .rbxl files)
- If changes don’t sync, check Rojo connection status (green = connected)
- If compilation fails, check Terminal 2 for TypeScript errors
- Restart Rojo server if connection is lost
Best Practices
✅ Do
- Enable Streaming for multiplayer/large world games
- Disable Streaming for single-player/client-authoritative games
- Use CORP’s streaming features (
isStreamedIn(),isLoadedChanged,InstanceNetworkVariable) - Use Tags to mark CORP scene roots with
GameObjectSceneRoot - Organize Workspace with folders and meaningful names
- Test Frequently in Studio play mode
- Use
$componentsfolders for component configuration - Check RunService.IsServer() when needed
- Use CFrame for GameObject transforms
- Keep Server Authoritative for multiplayer
❌ Avoid
- Don’t access Roblox instances without checking
isStreamedIn()when streaming is enabled - Don’t use StreamingEnabled = true with client-authoritative games
- Don’t access Workspace directly in most CORP code (use GameObjects)
- Don’t create instances manually when CORP can handle it
- Don’t forget to anchor Parts in the Workspace (if static)
- Don’t hardcode paths to instances (use VFS for assets)
- Don’t mix LocalScripts and Scripts unnecessarily (let CORP handle it)
Common Issues
”Scene root not found”
- Cause: Missing
GameObjectSceneRoottag - Fix: Tag a Folder in Workspace with
GameObjectSceneRoot
”Component not spawning”
- Cause: Component not exported or name mismatch
- Fix: Check
exports/components.tsfor correct mapping
”Client can’t access instance”
- Cause: Instance is in ServerStorage or ServerScriptService
- Fix: Move to ReplicatedStorage or Workspace
”Instance not found” (with streaming enabled)
- Cause: Instance not yet streamed in to client
- Fix: Use
NetworkObject.isLoadedChangedorInstanceNetworkVariable.waitForValue()
”Streaming error with client authority”
- Cause: StreamingEnabled is true with client-authoritative game
- Fix: Set
Workspace.StreamingEnabled = falsein Studio (required for client authority)
Next Steps
Now that you understand Roblox Studio basics:- Getting Started: Build your first CORP game
- Core Concepts: Learn about GameObjects and Components
- Scene Management: Create scenes in Studio
- Networking: Add multiplayer features
- Unreal System: Understand Gamepacks and authority
Master Roblox Studio to build amazing CORP games! 🎮