How do I :GetChildren that only contain something specific within it? I want to get the children of a directory full of folders, but I only want to find folders that contain a Color3Value inside them.
1 | for _,Child in pairs (MyTargetObject:GetChildren()) do --Get all children, Replace MyTargetObject |
2 |
3 | if Child:IsA() then --Checks if a child is a certain object, put any classname between the brackets |
4 |
5 | print (Child.ClassName) --Print |
6 | end |
7 | end |