Your first script
Scripts are instructions in the Luau language. They run from top to bottom – just like the commands in the code adventure.
What you’ll learn
- create a Script in ServerScriptService
- write something to the Output with print
- tell Script and LocalScript apart
Create a script
In the Explorer, hover over ServerScriptService, click the + and choose Script. An editor opens with one line of example code. Delete it and write your own code.
print: messages to yourself
With print you write text to the Output panel. That way you see what your script is doing – pros use this all the time to find bugs.
-- This script is in ServerScriptService
print("Hello, Roblox!")
print("My game is starting")Script or LocalScript?
A Script runs on the Roblox server and applies to all players. A LocalScript runs only on one player’s device (e.g. for buttons on the screen). To start with, always use a Script.
🛠️ Try it
Create a Script, make it write three lines to the Output and press ▶. Can you find your messages in the Output?
🧠 Mini quiz
Where does the text of print("Hello") appear?
print writes to the Output – only you as the developer see it.
In which order do commands run?
Just like in the code adventure: a program runs line by line from top to bottom.
✓ Lesson done! On to the next one.
Roblox and Roblox Studio are trademarks of the Roblox Corporation. mahshid.de is not affiliated with Roblox. All links to Roblox lead to the official sites.