Ad
Log in to vote
0

What is parent and child? please respond

Asked by
0nlyJP 0
3 days ago

Hi! I'm new to scripting on ROBLOX and I've been hearing about something called parent and child. Would any of you be willing to explain to me what it is?

5 answers

Log in to vote
1
Answered by 3 days ago

In Roblox, objects are put in a hierarchy or a tree. The words parent and child are relative which allows you to access objects that are above or below it.

Think of a folder on your desktop. The folder belongs to your desktop, so it is a CHILD of the desktop. If there is a text document in the file then the document is a child of the folder. The text document's parent is the folder and the folders' parent is the desktop. One object can have many children but one object can have only one parent.

In Roblox you can see this hierarchy in the game explorer (click view when editing a place).

0
Got it! Thank you! 0nlyJP 0 — 3d
0
Please accept my answer. radiant_Light203 510 — 3d
Ad
Log in to vote
0
Answered by 3 days ago

This will be helpful https://developer.roblox.com/en-us/api-reference/property/Instance/Parent

Log in to vote
0
Answered by
P_4rio 15
3 days ago

Parents and children are nicknames for basically anything example:

You have a Script inside of a Part that means the Parent of the Script would be the Part and the Part's Child would be the Script

Log in to vote
0
Answered by 3 days ago

Ok, I don't know how to explain this, but here you go. Got to view. Then explorer. There will be everything in your game look for a little arrow in the right of the asset in the game. More things will appear these things are the children and the parent it's the asset that had the arrow.

Log in to vote
0
Answered by 3 days ago

Basically, parent is the object that holds an instance or model. Child are the models and things you put inside a model. The child's parent is the thing that holds it. Almost as real life.

Answer this question