October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Enter Scripts in Roblox Studio

Add a Script through Explorer in Roblox Studio, enter Luau in the Script Editor, and check Output during a playtest. Script type and location determine where code runs.
WorldRoblox Studio Length2 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To enter a script in Roblox, open your experience in Roblox Studio, add a Script under ServerScriptService in Explorer, and type Luau code in the Script Editor. Run a playtest and check Output to confirm the script ran or see errors.

How to add a script and enter code

  1. Open your experience in Roblox Studio and make sure the Explorer window is visible.

  2. In Explorer, hover over ServerScriptService and click the + button.

  3. Select Script. Studio creates the script and opens it in the Script Editor.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    #1 Best Overall
    Roblox Physical Gift Card
    • Redemption: Online only. Robux cards can only be redeemed in a browser at Roblox.com/redeem. They cannot be redeemed in the Roblox mobile app or any video game console.
    • Roblox is an immersive platform for connection and communication. Every day, millions of people come to Roblox to create, play, work, learn, and connect with each other in experiences built by our global community of creators.
    • Get more with every Roblox Gift Card! From now on, when you redeem a Roblox gift card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
    • Deck out your avatar and unlock additional perks in your favorite experiences when you use Roblox Gift Cards to purchase Robux (Roblox's virtual currency).
    • Each gift card grants a free virtual item upon redemption.
  4. Rename it in Explorer to describe its job, such as HelloScript. Double-click the script there to reopen it later.

  5. Type or leave the starter line print("Hello world!") in the editor.

  6. If Output is not visible, open it from Studio’s Window menu.

    Rank #2
    Roblox Digital Gift Card - 1,000 Robux [Includes Exclusive Virtual Item] [Digital Code]
    • The easiest way to add Robux (Roblox’s digital currency) to your account. Use Robux to deck out your avatar and unlock additional perks in your favorite Roblox experiences.
    • This is a digital gift card that can only be redeemed for Robux at Roblox.com/redeem. It cannot be redeemed in the Roblox mobile app or any video game console. Please allow up to 5 minutes for your balance to be updated after redeeming.
    • Roblox Gift Cards can be redeemed worldwide, perfect for gifting to Roblox fans anywhere in the world.
    • From now on, when you redeem a Roblox Gift Card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
    • Every Roblox Gift Card grants a free virtual item upon redemption.
  7. Start a playtest. Look for Hello world! in Output, then stop the playtest.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is Roblox’s beginner workflow for creating a script and checking it during a playtest. See the Roblox Creator Hub: Create a script.

Where to put a script

ServerScriptService is a good starting location for a server-side Script, but it is not the right place for every kind of code. A script’s type, Explorer location, and RunContext determine where and whether it runs. A script can appear in the editor yet not execute if its type and location do not match.

Rank #3
Roblox Digital Gift Card - 2,500 Robux [Includes Exclusive Virtual Item] [Digital Code]
  • The easiest way to add Robux (Roblox’s digital currency) to your account. Use Robux to deck out your avatar and unlock additional perks in your favorite Roblox experiences.
  • This is a digital gift card that can only be redeemed for Robux at Roblox.com/redeem. It cannot be redeemed in the Roblox mobile app or any video game console. Please allow up to 5 minutes for your balance to be updated after redeeming.
  • Roblox Gift Cards can be redeemed worldwide, perfect for gifting to Roblox fans anywhere in the world.
  • From now on, when you redeem a Roblox Gift Card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
  • Every Roblox Gift Card grants a free virtual item upon redemption.
Script type What it is for Placement guidance
Script Runs on the server when its location and RunContext allow it. For a basic server-side example, place it in ServerScriptService. Under the default Legacy context, a Script runs in a server container such as ServerScriptService or Workspace.
LocalScript Runs on the client. Common client locations include StarterPlayerScripts, StarterCharacterScripts, StarterGui, and StarterPack.
ModuleScript Holds reusable code that other scripts can use. Choose a location appropriate to the scripts that need to access it.

Roblox documents these script types and their placement rules in Script types and locations. Check those rules when a script does not run where you expect.

What the Script Editor and Output do

Roblox experiences use Luau, Roblox’s scripting language. The Script Editor is where you enter and edit that code; it opens when you create a script or double-click one in Explorer. Roblox describes it as Studio’s primary scripting tool. It includes syntax highlighting, autocomplete, navigation, and real-time feedback.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Output shows engine messages, messages from print() and warn(), and errors. That makes it the first place to check during a playtest if you want to verify a simple script or diagnose a problem. The editor’s autocomplete is helpful, but its suggestions may be incorrect, incomplete, or based on older APIs or Lua rather than Luau, so review and test the code it offers. See Roblox’s Script Editor documentation.

Rank #4
Roblox Digital Gift Card - 2,000 Robux [Includes Exclusive Virtual Item] [Digital Code]
  • The easiest way to add Robux (Roblox’s digital currency) to your account. Use Robux to deck out your avatar and unlock additional perks in your favorite Roblox experiences.
  • This is a digital gift card that can only be redeemed for Robux at Roblox.com/redeem. It cannot be redeemed in the Roblox mobile app or any video game console. Please allow up to 5 minutes for your balance to be updated after redeeming.
  • Roblox Gift Cards can be redeemed worldwide, perfect for gifting to Roblox fans anywhere in the world.
  • From now on, when you redeem a Roblox Gift Card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
  • Every Roblox Gift Card grants a free virtual item upon redemption.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

If your script does not seem to run

For the broader language overview, see Roblox’s Scripting documentation.

Quick Recap

Bestseller No. 1
Roblox Physical Gift Card
Roblox Physical Gift Card
Each gift card grants a free virtual item upon redemption.; Physical gift cards are delivered active via mail.
$50.00
Bestseller No. 2
Roblox Digital Gift Card - 1,000 Robux [Includes Exclusive Virtual Item] [Digital Code]
Roblox Digital Gift Card - 1,000 Robux [Includes Exclusive Virtual Item] [Digital Code]
Every Roblox Gift Card grants a free virtual item upon redemption.; For more information, please visit roblox.com/giftcardFAQs.
$10.00
Bestseller No. 3
Roblox Digital Gift Card - 2,500 Robux [Includes Exclusive Virtual Item] [Digital Code]
Roblox Digital Gift Card - 2,500 Robux [Includes Exclusive Virtual Item] [Digital Code]
Every Roblox Gift Card grants a free virtual item upon redemption.; For more information, please visit roblox.com/giftcardFAQs.
$25.00
Bestseller No. 4
Roblox Digital Gift Card - 2,000 Robux [Includes Exclusive Virtual Item] [Digital Code]
Roblox Digital Gift Card - 2,000 Robux [Includes Exclusive Virtual Item] [Digital Code]
Every Roblox Gift Card grants a free virtual item upon redemption.; For more information, please visit roblox.com/giftcardFAQs.
$20.00
Bestseller No. 5
Roblox Digital Gift Card - 5,250 Robux [Includes Exclusive Virtual Item] [Digital Code]
Roblox Digital Gift Card - 5,250 Robux [Includes Exclusive Virtual Item] [Digital Code]
Every Roblox Gift Card grants a free virtual item upon redemption.; For more information, please visit roblox.com/giftcardFAQs.
$50.00

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  2. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
  3. How to Get Rotting Lightbringer in Diablo 4Diablo 4Blog17min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.