How can I get all the descendants, without using GetDescendants()

The title says it all, but i’ll elaborate.
I’ve been having trouble using GetDescendants because its goofy and doesn’t get all the descendants, so is there a way to individually get each child of each child of each child and so on, or another option?

local function doSomethingToDescendants(parent: Instance, _function: (instance: Instance) -> nil)
	for i, v in ipairs(parent:GetChildren()) do
		doSomethingToDescendants(v, _function)

		_function(v)
	end
end