Think of it this way.
Imagine the candy pieces in a row:
F1P1, F1P2, F1P3, F1P4, F2P1, ..., F6P4
where "F1P2" means "flavor 1 piece 2".
Then, place the kids in whatever order you want below that:
K5, K3, K21, K10, K6, ...
Then, you've given each kid a flavor (for example, flavor 1 went to kids 5, 3, 21, and 10).
There's 24! ways of ordering the kids, but they're redundant. There's 4! ways to rearrange the first four without changing the outcome, 4! ways to rearrange the second four, etc.
So your final answer is
$$\frac{24!}{4! 4! 4! 4! 4! 4!}$$
which by definition is the multinomial coefficient that Jan mentioned, $\binom{24}{4,4,4,4,4,4}$.
Your way of doing it does indeed come out to the same result, as mentioned in the linked Wikipedia page, and as you can see if you write out your version using the factorial definition and cancel.
Verifying that the result is the same in R:
> choose(24,4)*choose(20,4)*choose(16,4)*choose(12,4)*choose(8,4)*choose(4,4)
[1] 3.246671e+15
> factorial(24) / factorial(4)^6
[1] 3.246671e+15