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

Creating a Script

Creating a Script

Aug 29 2019, 9:26 AM PST 5 min

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 givethe 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. The script editor will open, but ignore that for a moment.
  1. Rename the script PracticeScript (Select the Script > Right-click > Rename). It’s important to name your scripts so you always know which is which.

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.