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

How do I get the "Parent" of a table?

For example, say we have this:

Table1 = {Table2 = {} }

If I only had Table2, how do I get Table1?

1 answer

unfortunately, that's impossible :) you'll have to store that information somewhere else. you can also look into a metatable which is a little bit different but could still work depending on your use case. for example:

cool = {"dope"}
boring = {"not dope"}
setmetatable(cool, boring)
print(cool, getmetatable(cool))
-- {"dope"}, {"not dope"}

it gets more complicated than that but those are the basics of it

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