How to get the child list

How to make an object 's child into a list?

For example

Object 
   Red
   Blue
   Yellow

and the output would be
{Red,Blue,Yellow}

Are you talking about all children in an Instance? You can use Instance:GetChildren() to get this exact array.

what if i want to get it as game.object.blue?

Do you mean as a string path?

Do you mean like this?


Here all the parts’ brickcolors in workspace gets added to a table, its the most similar to what you wanted i think?

Can also just do it without tables.

for _, part in pairs(workspace:GetChildren()) do
	if part:IsA("Part") then
		print(part.BrickColor)
	end
	
end

If you are referring to the object’s path, use the instance’s method Instance:GetFullPath().