A script is a series of text-based instructions that a program runs to create custom behavior to learn how to script we need to know the specific language that the computer can understand in this case in Roblox we’re going to be learning how to use Lua.
Tto get started we’re going to open Roblox to do then we’re going to open the command bar and output windows command bar is where we’re going to enter our commands and the output is where we’re going to see the results it’ll also show us if we make any mistakes along the way the first command we’re going to learn is called print.
I’m going to start off by typing the word print then in open parentheses shift 9 then we can say what we want to print so in this case I’m going to type hello world and then a close parenthesis with shift 0 and we hit enter and we can see it in the output.
We can print out other things as well for example we can print out numbers so let’s say we want to print out 10 we’ll type print open parentheses 10 then close parentheses hit enter and I’ll show 10 in the output now a couple things to know about the print function first it’s very important that it’s spelled exactly this way all lowercase letters it’s also important that you include the parentheses around what you want to print the other thing that is important is that you.
Use quotations when you’re printing a word or a phrase so let’s say we want to print out roblox is cool now if we just try to print that on its own the output would show an error for sentences we need to surround them with quotation marks remember this is only needed for a word or phrase in which in program is called a string for other things like numbers as we did before we don’t need to include the quotation marks.
Where to Roblox Scripting
AlvinBlox – he makes Roblox scripting tutorials, worth checking out.