Loops in Module scripts

If you run a loop in a module script
For example:

local self = {}
self.x = "porcupine"
self.y  = 15
self.Counter = 10

 self.Counter -= 1
 self.Counter <= 0

return self {}

Will you still be able to reference the other variables or will the module script only be able to return those values after the loop has finished?

1 Like

The module script will not return until all the code in it has ran (declared if its a function)