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

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

Asked by 7 years ago

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!

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 Bellyrium 310 — 7y
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. Bellyrium 310 — 7y

1 answer

Log in to vote
2
Answered by
thesit123 509 Moderation Voter
7 years ago

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.

0
Good simple answer! Bellyrium 310 — 7y
0
Thanks! :) thesit123 509 — 7y
Ad

Answer this question