Basics Flashcards
(18 cards)
What is Workplace?
Everything you see in the map is from workplace
What is “ClassName” in properties?
What it is, e.g. (a Terrain would be called “Terrain”
What is “CanCollide” in properties?
If the player can touch the part or not, if its turned off player walks right through (e.g. walls)
Can you change the values in property using scripts?
Yes (e.g. colour, size, material etc)
What is “print” in a script do?
Prints the text/number/calculation in output (e.g. print (“hello world”)
Do integers in print require brackets?
No
What is – (2 dashes) for in a script?
Comment
What is a variable?
A name that holds a value (e.g. “local HousePrice (name) = 300k (value)
Do i use quotations for a variable name in print? And why
Because regardless of the value stored in the variables name, when using quotations for “print” the exact text will be in output and not the value of it
How would i change a Part’s material to “Wood” in a script?
Game.Workspace.Part.Material = “Wood”
How to change Transparency of a Part in a script?
Game.Workspace.Part.Transparency = 1
How to shorten my scripts? Instead of saying “game.workspace.Part”
Turn “Part into a variable. “Local Part = game.Workspace.Part”
What is a function?
A named block of code that performs a specific task, allowing you to reuse that code multiple times in your script by simply calling its name
What is return?
The act of a function sending back a specific value to the part of the script where it was called
What are parameters?
Variables inside the function
Where are parameters located in a function?
Inside the brackets acting as a variable, e.g. “local function myFunction(parameter1, parameter2)”.
What does == mean?
Test if its equal to
What does ~= mean?
Tests if its not equal to