Basically, i want to get the head of all parents in the folder, no matter how many parents there in the way.
This is the example, and i am trying to check if the head parent of all parent == “Folder”
I dont want my script to look something like that:
if Part.Parent.Name == "Folder" or Part.Parent.Parent.Name == "Folder" or Part.Parent.Parent.Parent.Name == "Folder" or Part.Parent.Parent.Parent.Parent.Name == "Folder" or Part.Paren.Parent.Parent.Parent.Parent.Name == "Folder" or Part.Parent.Parent.Parent.Parent.Parent.Name == "Folder" then
end
Is there any way i can do that?