The first thing you should learn is the Print command. Type in
print()
Print displays a inputted message or variable (we'll get to that later) or whatever you want. So to display a specific message. For example, Type in
—
print("Hello World!")
—
Once the command or script is run, the print command will display in the output what you put in the brackets.
—
Output:
Hello World!
—
So now instead of 'Hello World!' put wherever else you want to. (Remember to keep the quotation marks).
—
Now onto variables. Variables (if you don't know) are a storage unit. So for example if I did
—
ExampleVariable = 123
print(ExampleVariable)
—
Output:
123
—
(The reason I didn't put quote marks in the print is because I wasn't typing a string. Strings are text). So the print outputted ExampleVariable, which had a value of 123. You can also set the variables value to a string. For example
—
ExampleVariable = "One two three"
print(ExampleVariable)
—
Output:
One two three
—
Cool right?
Now variables can also hold (on Roblox) objects! If you don't know what an object is it is a part or something in the game of Roblox.
—
CoolObject = game.Workspace.MyFavPart
print(CoolObject)
—
Output:
MyFavPart
—
And that's all I'm showing you today.
—
—
—
—
—
—
—
—
—
Thank you for reading the first part of my Lua coding tutorial! I do not know if I will continue this project but idk...
![](https://img.wattpad.com/cover/368592350-288-kffd6f4.jpg)
YOU ARE READING
Lua Coding for Beginners (Roblox's Additions.)
Non-FictionLua coding haha (mostly Roblox stuff)