UevKF8zjRV_WEtpJsXhr

Creating a Script

Creating a Script

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

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 fireballs, or anything else imaginable.

Creating New Scripts

Scripts are commonly created in ServerScriptService, a special folder for holding and running scripts.

  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.


Previous Creating Checkpoints Next String Variables