print((#workspace:GetChildren()) and (#workspace.Npcs:GetChildren()))
real question here is it possible to check 2 instances in one instead of making a serepate function for it?
example:
8 children, 10 npcs
aka something like this
local a: Folder = workspace.a
local b: Folder = workspace.b
local function tableConcat(t0,t1)
for i = 1, #t1 do
t0[#t0 + 1] = t1[i]
end
return t0
end
local t = tableConcat(a:GetChildren(), b:GetChildren())
for i,v in pairs(t) do
print(i,v)
end
--output-->
1 aaaa
2 sjdlqsjd
3 bbbb
4 omklmk
Probably the quickest way of doing this, although it only works to concat 1 table to another. If you need to do this with multiple tables, it would require more looping.