Hello!
I have a question about this module “configuration”.
local module = {
['DamageBricks'] = (function()
local bricks = {}
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA('BasePart') then
if v:GetAttribute('DamagePart') and v:GetAttribute('DamageToTake') then
bricks[#bricks + 1] = v
end
end
end
return bricks
end)()
}
return module
Here’s what I have.
Now, does the function run when I first require it, every single time I require it or only when the game starts?
If it’s the second option, is it any more efficient than requiring it and then calling the function itself?
