Make sure to never put strings around the variable itself when printing, otherwise it will print the word “variable” rather than “YellowNoobs!” variable = "YellowNoobs!"
Copy and paste your code inside of the command bar and look at the output to see if it works. Let’s now try to print our string using a variable. The starting letter in the variable should not be capital letter, and can never include a number, however underscores are fine. Variable names can use letters, numbers, and underscores, but cannot use any spaces. I will start off by using a string variable, I will use the same phrase we used in the previous lesson, but instead shortening it to the word variable. They store booleans, numbers, and strings. Variables aren’t necessary, but they are highly recommended and considered vital because they save a lot of time and keep your scripts organized.
Now that you’ve learned how to make a script, you’ll learn what variables are and how to make on of your own. You may replace YellowNoobs with any other text you wish as long as it is in-between (""), or the strings, the end result should look something like this,Ĭongrats! You’ve ( probably ) made your first line of script! If you’d like to see if the script works, scroll down to Output and paste your command onto the Command Bar, you should see the printed text inside Output. Then, type out (“ YellowNoobs!”) after the message, make sure there is no spaces between print and ( if you want your script to work. Printing is perhaps the first thing that all programmers learn, print is a command that allows you to print out a statement.Įrase the following text, once finished type out print in all lowercase letters, if spelled incorrectly or typed with any capitals, the script ceases to function. Now that you have a proper format, you will learn one of the most basic commands in Lua. "įinally, your screen should look something similar to this, To select the proper format, click on View in the upper side of your screen, then make sure you have selected or have the following, " Properties, Explorer, Command Bar, and Output.
Being disorganized is one of the worst things you can do while scripting, it is best to follow a specific format, but feel free to change it however you wish. Note, the following tutorial is for Roblox Lua, your experiences with other programs such as JavaScript, Python, C+, PHP, and all others will be significantly different.īefore starting, please make sure your format is correct to ensure the perfect programming experience. The goal of scripting is simple, your attempting to make the game itself work, not much else if you put it into a broad spectrum.
Unlike building and UI design, scripting is fairly practical and has not much " tastes " to it.
If you have any disagreements or things you wish to add on the tutorial please place it down below. This tutorial will work with steps, I believe each section is timed appropriately. This tutorial is not made for professionals, this is for pure beginners or just intermediates who want to boost their skills up a bit. In the following tutorial, you’ll be learning on the basics and best methods to use and experiment with Roblox Studio.
The update should add much more information, advice, fixes of mistakes I’ve made describing things, overall a huge general improvement! When I posted this tutorial, I did not expect that this many people would be learning from it. Explained by With Help From I will be updating this post in several weeks from now.