for _, gui in pairs(script.Parent.Abilities:GetChildren() and script.Parent.Passives:GetChildren())do end)
As shown in the code above, when I use "and" it only loops through the 2nd argument, vice versa if I use "or" it only loops through the 1st argument. I was wondering if there is a way to achieve looping through both parameters without making 2 separate loops thanks.
You could always get descendants but that will return all the children. You could filter it by adding an if statement, its better if I show you the code.
for _, gui in pairs(script.Parent.Abilities:GetDescendants()) do if gui.Parent.Name == "so and so... the folder or frame u want to get" then -- ... code ... end end)
If this helped, i'd appreciate this being accepted, have a question, add a comment. Good luck.