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
for _,Child in pairs(MyTargetObject:GetChildren()) do --Get all children, Replace MyTargetObject

    if Child:IsA() then --Checks if a child is a certain object, put any classname between the brackets

        print(Child.ClassName) --Print 
    end
end
Ad

Answer this question