Your First Script
This tutorial is for complete beginners in scripting. You will use this tutorial to learn how to create a simple script from which you can build scripting knowledge.
It is important to get to know the environment you will be working in. If you haven't already, read through the Roblox Studio article to become more familiar with the Roblox Studio.
Open up Roblox Studio. Make sure you have the Standard Studio View setup. You'll also need to have your 'Basic Objects' window enabled. This can be done through 'View -> Basic Objects' on the top bar. This will be the setup used in most tutorials from now on.
Once you have the studio setup, create a new place to work in. You'll need an open place in order to create new scripts and run them.
 Inserting a New Script
Next, go over to your 'Basic Objects' window. Find the Script ), and double click it. Alternatively, use the 'Search Bar' to find the item you're looking for, in this case 'Script'.
In the Explorer panel, you should see a new script icon named "Script", under the Workspace. That means you've just inserted a script into the workspace!
 Editing Your Script
Try clicking the Play button (). In the Output, you'll see Hello world! Where did that come from?! Well, it happened because of the script you inserted! Press the Reset button () to reset everything. If you can't see your script, click the expand button () next to the Workspace to see its children (if you still don't see your script, try inserting another one).
Let's see how the script did that. Double-click on your script to open the script editor. A new tab will open with the name of your script, and a white space with some text will cover the game window. Notice that the text says
print 'Hello world!'That's where the text in the Output came from. The word before the shows that we're using a function. Functions can be used to do certain things. In this case, the print function is used to "print" something to the Output.
 See Also
If you're looking for something similar or closely related to this article, see these: