I am making a board game on roblox, but I need to select something inside units but due to the messy placements, the units don't all have the same parent. I'm not sure how to explain it too clearly so this is an example of a problem which is similar.
Say if I had three items in the workspace with different names, (A,1 and !)
A has a child in it, which is a folder, let's call it B, and inside B is a bool value which we will call C
1 also has a child in it, called 2, and a bool in it called 3
! has only one child called ?, and that is a bool value
all bool values have "false" as default and all three bool value's names are the same
How do I change all bool values (C,3 and ?) to "true" without having to type game.Workspace.A.B.C.Value = true
but instead just do something like for i,v in pairs (game.Workspace.GetChildren()) do ...

7 comments
YES, I forgot about it's name, that was just what I was looking for, thanks.
Dont forget to accept this answer if it helped you.
GetChildren() is the same as GetDescendants() @jackfrost178
GetChildren() gets the immediate children, while GetDescendants() gets the children of those children and so on, they are not the same. If they were, this question wouldnt have been asked, and one of the two API would have been deprecated by now.
If there were only one sub-directory, they would do exactly the same thing.
If there were 1 sub directory, GetChildren would just get that sub directory, not whats inside of it, you would have to reference that yourself, please see the roblox wiki on GetChildren and GetDescendants
Yes you can use :GetDescendants() or if you know the exact name of the child you can do :FindFirstChild("NAME", true)