Script Types
Roblox has three kinds of scripts, each serving a distinct role in your game’s architecture.- Server Scripts
- Local Scripts
- Module Scripts
A Script (sometimes called a server script) runs on Roblox’s servers and has authority over the game world. It can modify the workspace, manage player data, handle purchases, and communicate with clients via RemoteEvents and RemoteFunctions. Server scripts are placed in Creating a part from a server script:
ServerScriptService or directly in the workspace.Key Roblox APIs
These services are the ones you will reach for in almost every project.RemoteEvents and RemoteFunctions
RemoteEvents and RemoteFunctions let the server and client talk to each other. Place them inReplicatedStorage so both sides can reference them.
RemoteEvent — fire and forget (no return value needed):
Studio test mode vs. live game: When you playtest in Roblox Studio using the Play button, your scripts run locally and some services (like
DataStoreService) are in a sandboxed mode. Always use Team Test or publish to a test place to verify server–client communication behaves exactly as it will in production.FilteringEnabled and Server Security
FilteringEnabled is always on in modern Roblox. This means changes made on a client are not automatically replicated to the server or other players. Any action that should affect the shared game world — awarding items, modifying stats, spawning objects — must be handled by a server Script, not a LocalScript.This is a core security model. If you let clients directly modify server state, exploiters can abuse it to give themselves unlimited currency, kill other players, or break your game. Always route important actions through a RemoteEvent and validate every incoming value on the server.
Keep Learning
Lua Basics
Brush up on variables, tables, loops, and other Lua fundamentals that underpin every Roblox script.
Debugging Tips
Learn how to interpret Luau errors from the Output window and fix broken scripts quickly.