UevKF8zjRV_WEtpJsXhr
We use cookies on this site to enhance your user experience

Create a Script

5 min

Create a Script

picture of a computer lab for intro to lua coding for Roblox

Learning Objectives Students will be able to:
  • Create a new script and open the Script Editor.
Prerequisites Students should:
  • Have general knowledge of the Roblox Studio interface and creating new projects (see Intro to Studio)

Coding is the process of creating instructions for computers to follow. Just like people use different languages such as English and Spanish, so do programs. Roblox uses the coding language Lua.

In Roblox, lines of Lua code are held in scripts. These scripts give the game sets of instructions on how to give players health points, create a rain of llamas, or anything else imaginable.

Creating New Scripts

You’ll create your first script in ServerScriptService, a special folder just for holding scripts. Placing scripts there makes them easier to find later.

  1. In the Explorer, hover over ServerScriptService to see the .
  1. Click the and select Script. This opens the script editor.
  1. Right-click on the Script and select Rename. Type in PracticeScript. Naming scripts is an important way of remember what each one does.

Using the Script Editor

Whenever you create new scripts, the script editor will automatically open up. This is where you will type your code in.

To find the script next time you open up Roblox Studio, click on the name of the script above the game editor, or double-click the script’s name in the Explorer.


These documents are licensed by Roblox Corporation under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Roblox, Powering Imagination, and Robux are trademarks of Roblox Corporation, registered in the United States and other countries.