Scripting Tutorial - Basics

Hi, soo this is tutorial dedicated to my close friend who wants to learn scripting. I’m ideal, i’m scripter for about 7 years now, and i want to share my knowledge with you, i’m happy that i could help :}

Note: My english can be bad, but i think you’ll understand tutorial, i’ll add scripts and simple describtions

I’ll make this tutorial daily if i can, soo for now there is one thing

-----------------------------------------------------------------------------------------------------------------------------
1. Basics of Basics
Soo, to learn scripting you have to know Roblox Studio well, this means you have to know how to use explorer and propertiess, and you have to know how to create scripts.

first, we have to open output, output is tab where all prints and technical things like errors or warnings will appear, this tab is very important for debugging or learning.

After this we can create new script, it should be inside server script service, it’s a good practice, we will talk about this later.

When we created our script, we can open it, we will see:

print("Hello world!") -- after running the game this text will appear

soo Print methood shows text on output, but it’s not important? right?

Print is one of the most important things, you can use it for debugging or testing, without it, the work will be harder

warn("Error") -- shows this text on the output, but it's yellow and it's warning

Warn methood is a methood used for debugging, it works the same as print, but it have different color, you can use it for more important errors in your code

print("Hi")
---------------------
print("Hello")

Also, two “-” symbols is comment, you can use them to describe your code, or make it look better

--[[
trees are great
snow is cold

]]

if you will add double square bracing, you can create multiline comment, this is usefull for longer describtions

7 Likes

Doesn’t roblox discourage making lua learning topics?

2 Likes

yea, but my friend don’t want to use them, i made this for him, and dev forum is great place

1 Like

Yo, I remember you! Weren’t you already making a very helpful guide that you couldn’t finish due to school and stuff? Link him that and change it a bit to be more “modern”, It’s really useful and easy to understand already and good for beginner scripters.

2 Likes

yea, thanks, but i want to make new one, this last guide was bad written

2 Likes