A question about ModuleScripts and For loops

Hi everyone!

I’ve noticed that doing

for i,v in iparis (Module1,Module2) do
 print(i,v.Code)
end

Does not give an error so i was wondering if there is a way to print both v.Code in one output
(running the script up here gives only the first v.Code)

The other option is to create two for loop with Module1 and Module2 if is not possible, just to make the script lighter

You will have to create your own iterator function to iterate over both arrays.

That’s because there is nothing to loop through with ipairs, it would error if you used pairs because Code isn’t a valid member of a module. I think you meant Source.