Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I :GetChildren that only contain something specific?

Asked by 3 years ago

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 answer

Log in to vote
2
Answered by 3 years ago
Edited 3 years ago
1for _,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
7end
Ad

Answer this question