Folder
Group your project's objects into systems, or build lists and rows of your own while a program runs.
A folder holds other objects and has no members beyond ShotInstance's. The project's root is one, named after the project. shot check knows its children by name: a misspelt root.Settings.Currency is an error that lists the children that exist. Instance.new("Folder", parent) makes one, and a folder with a same-named script inside is a folder module that require takes.
Made with Instance.new("Folder") or Clone().
Example
-- Shop is a Folder of the project holding two NumberValues; a Folder made at run time holds a basket.
local names : {string} = {}
for _, item in root.Shop:GetChildren() do
table.insert(names, item.Name)
end
table.sort(names)
print(root.Shop.Name .. " is a " .. root.Shop.ClassName .. " holding " .. table.concat(names, ", "))
local basket = Instance.new("Folder")
basket.Name = "Basket"
basket.Parent = root
root.Shop.Apple:Clone().Parent = basket
root.Shop.Pear:Clone().Parent = basket
print("Basket holds " .. #basket:GetChildren() .. " copies, in the project's root: " .. tostring(basket.Parent == root))
basket:ClearAllChildren()
print("after ClearAllChildren: " .. #basket:GetChildren())
basket:Destroy()
print("a Basket in the project: " .. tostring(root:FindFirstChild("Basket") ~= nil))Shop is a Folder holding Apple, Pear Basket holds 2 copies, in the project's root: true after ClearAllChildren: 0 a Basket in the project: false
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
