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.
✓ ANSWER ACCEPTED
How do I :GetChildren that only contain something specific?
1 answer
✓ Accepted answer
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
This discussion is preserved as it was. New answers, comments, and votes are closed.
