Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I've seen alot of ".Parent" scripting and I want to know how Parent can be under another thing?

Like what really gets me confuse is how Parent is under Script when it's a child. Please explain it to me like I'm a 5 years old because I'm really new at scripting. Thank you very much!

2 comments

0

Parent is a value carried over by roblox internally. A lot of code languages don't actually let you simple declare a 'parent' in a pathway (thats whats its called when you direct code to specific information). So roblox puts a table of values in each instance with keys (what you call the "number" in a table that's not numbered) == to the value. So when you state "Something.Parent" you are actuall

0

are calling a table value due to roblox's weird mechanics. That table value directs you back to parent. These values are also locked so when the table switched the actual parent does too.

1 answer

PROPERTY: If the script is something .Parent means that the coder/scripter/developer wants to get whatever object that is currently hold it. For example:

script.Parent

That meant that I want to get the object that is currently holding the script.

2 comments

0

Good simple answer!

0

Thanks! :)

This discussion is preserved as it was. New answers, comments, and votes are closed.