Script Editing

This tutorial is to teach you the basics of editing code.

1. How to create a script file in Roblox

To create a script file, go to the Explorer and click on the “plus” mark next to the location you want the script to be in.

In this example let’s add a script under “ServerScriptService”, and name it “main”:

 

2. Script editing

Before getting into how to script, let’s learn how to edit and type.

Let’s start off with typing some random characters into the script:

At the end of the line, we can see a blinking vertical line.

This is our current editing position.

If we type something now it will show at the blinking position:

To change our editing position, use our mouse to click on the position we want to edit:

Return (Enter)

To create a new line below, we need to change our editing position back to the end of a sentence and press “Enter” key:

To insert a new line above, go to the beginning of the line and press “Enter”:

 

Backspace

To delete something, first change our editing position to the right side of the word we want to delete, then press “Backspace” key:

To delete something long, hold your mouse click to select the line you want to delete, and then hit “Backspace”:

Copy & Paste

To copy something (ask the computer to remember something), first select the line you want to copy:

Then press “Command” + “C” in Mac, or “Ctrl” + “C+ in Windows:

Mac: Windows:

Now the computer will remember what you have copied:

And to recall what you copied, move the editing position to where you want to paste the line:

Then press “Command” + “V” in Mac, or “Ctrl” + “V+ in Windows:

Mac: Windows: