Skip to content

Folder

Folder is a CoreObject representing a folder containing other objects.

They have no properties or functions of their own, but inherit everything from CoreObject.

Examples

Example using:

In this example, we search for the first ancestor of the script that is of type "Folder", then check if it's the root of the hierarchy.

local ROOT = script:FindAncestorByType("Folder")

print(tostring(ROOT))

if ROOT == World.GetRootObject() then
    print("Script is at the root of the hierarchy.")
end

See also: CoreObject.FindAncestorByType | World.GetRootObject



Last update: December 23, 2021