What is an Ancestor of an Instance?

Hello Developers,

So I watched a tutorial by someone on Youtube, in that video, I saw them type:
“Instance: FindFirstAncestor” and I can’t seem to understand it very well.

If anybody could help me figure out what it means, I would really appreciate it!

Also, this is my first ever post I made on this forum so I apologize if I posted on the wrong topic!

Thanks!

3 Likes

An ancestor is basically the endless hierarchy before itself. Meaning parent, parent of parent, parent’s parent of parent, etc. This goes endless until it indexes the root.

Also the first argument for it is a string, it tries to match the string to all of its ancestors as aforementioned.

6 Likes

Example:

Workspace
  Folder
    Part

“Workspace” would be an ancestor for “Part”

4 Likes

Oh ok, thanks for answering my question! I really appreciate it.

I get it now! Thanks for helping out!

2 Likes

An ancestor is essentially a parent or a parent of a parent, etc.
Example:
game
ReplicatedStorage
Folder
BoolValue

2 Likes

I think ancestors are the opposite of descendants, the parent of the parent or its parent, etc