Scripting notes for beginners in scripting(like me)

Hello all! So i’m learning to script, and i’ve been following AlvinBlox’s 2020 Beginner Scripting series.

I’m just here to spread some notes that i’ve put down for other people who might need it, and well, here you go I guess.

Note: I will be editing this as I follow the tutorials, this is just like a WIP resource.

My notes

my scripting notes:

1Four main types of data:
Text/Strings - e.g. “” or “Bla Bla Bla”
Number - e.g. 1234
Boolean - true/false
Object reference - e.g. game.Workspace.Part

2Variables:
A holder of any data type1 e.g. local text = “The quick brown fox jumps over the lazy dog” //or could be something such as: local Cheese = script.Parent.Cheese

3Print:
Puts a message or any data2 into the output e.g. print(“Hello World”); you would get the words “Hello World” to come up in the output.
If you have a variable such as: local message = “Hello World”, you can reference that by putting: print(message), leaving “Hello World” in the output
when you run the script.

4Instancing:
Creating a new instance(thing)
e.g. Instance.new(“Part”, game.Workspace)
“Instance.new” is basically saying “make a new instance”
“Part” references the type of instance you’re creating,
then that is followed by a comma, then the place you want to put the part, in this case, the workspace.

Instancing can be in a variable2, for example, you can put:
local MyPart = Instance.new(“Part”, game.Workspace).

This can be useful for doing things such as creating parts in a way that makes it easier. You can create motors and set them up INSIDE of your script instead of setting it up in properties.
This is commonly used for helicopter kits, where you need to use a motor/hinge to spin the rotor.

7 Likes