Where to Put Scripts in Roblox Studio
Many “copy and paste Roblox scripts” fail because they’re pasted into the wrong place. Use this map to decide where code belongs before you test it.
ServerScriptService
Use for server-only game logic: spawning, server-side validation, datastore saves, and authoritative state.
StarterPlayerScripts / StarterCharacterScripts
Use for player input, camera logic, movement helpers, and client-side effects. These are LocalScripts.
StarterGui
Use for UI screens, menus, HUD elements, and UI controllers. Pair UI with shared modules where possible.
ReplicatedStorage
Use for shared assets and ModuleScripts used by both server and client. This is a common home for a reusable “library” of helpers.
Next: learn how to quickly review a script before using it in How to read Roblox Lua scripts.