Answered Plainly
Display: Text size:

Your First Script in Roblox Studio

The short answer: A script is a list of instructions written in Luau that tells your game what to do. Roblox has three kinds: a Script runs on the server (the computer running the game for everybody), a LocalScript runs on one player's own device, and a ModuleScript is a box of shared code that other scripts can borrow. The biggest beginner lesson is this: where a script lives decides what it does — and whether it runs at all.

Meet the Output window

Before you write anything, find the Output window. Studio shows it along the bottom. The Creator Documentation calls it the most basic tool for understanding how your scripts behave, and it is where your scripts talk back to you:

Keep Output open for everything in this series. When a game does something weird, Output is the first place to look.

Your first script

This follows the shape of Roblox's own first-script tutorial. It spells a word out letter by letter.

  1. Open the baseplate place from the first page of this series.
  2. In the Explorer window (the list of everything in your game), hover over ServerScriptService and click the + button that appears.
  3. Choose Script. A new script appears.
  4. Rename it HelloScript.
  5. Double-click it to open the Script Editor, delete anything already in it, and paste this in — or tap Copy and paste:
local letters = {"h", "e", "l", "l", "o"}

for index = 1, #letters do
	print(letters[index])
end

print(table.concat(letters))
  1. Make sure the Output window is open, then run your game with Studio's Run (play) button. Stop it with the stop button when you are done looking.

What you should see in Output:

h e l l o hello

What just happened: the script holds a list (called a table — page 4 of this series covers tables properly) of five letters. The loop prints one letter at a time. The last line joins all the letters into one word with table.concat and prints the finished word. That is a real, working program — small, but real.

The three kinds of script

Where scripts live — and why it matters

The mistake every beginner makes once: a script in the wrong place simply never runs — no error, no message, nothing. Roblox's scripting guide makes the point with a second script placed in ReplicatedStorage: sitting there, it does not run, because that container is a storage shelf both sides can see, not a place that starts scripts. When your code "does nothing," check where it lives before you check what it says.

Sources (official only; read in full November 7, 2026):

The code example on this page was test-run before this page was written, and its output above is the output it produced. Checked November 7, 2026.