Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I :GetChildren that only contain something specific?

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

✓ 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.