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?
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).
This will be helpful https://developer.roblox.com/en-us/api-reference/property/Instance/Parent
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
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.
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.