Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

What is this line of code for?

Asked by 10 years ago

What does this line of code do? People put this down in their scripts (Such as .Activated Scripts) and I don't know what it does or what it is for. Let me know. Thanks.

Wall.Parent = game.Workspace

3 answers

Log in to vote
0
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

Somewhere else in the script, most likely near the top, Wall is defined as some sort of object, probably a wall model's clone.

Wall.Parent = game.Workspace sets this model's Parent to the Workspace, which is the same as, in the Explorer window in Studio, dragging it into Workspace. Workspace is where all parts and decals and such for what you see in the game are.

Ad
Log in to vote
-1
Answered by 10 years ago

'Wall' is an instance child. Normally, this comes after Instance.new('Child') Parent is a propertie, i have my own PROPERTIES tutorial. Properties by Marcoantoniosantos3 I recommend you to watch it carefully, you will understand!

But, if you don't: Parent is a propertie as i said, and it defines wich 'dad' as an example is of the child.

Learn some LUA is what i recommend you to. Thanks, marcoantoniosantos3

Log in to vote
-1
Answered by 10 years ago

Wall.Parent = game.Workspace sets whatever Wall is to be, to simply put it, inside the Workspace. Think of it in the Studio Explorer: basically, it puts Wall into the Workspace area.

Answer this question