Whenever I create a module, while it is open in script editor and edit the entire code from something that would return an error, for example to something as simple as:
local module = {}
function module.add(...)
local sum = 0
for _, n in ipairs({...}) do
sum += n -- combined op included in edit
end
return sum
end
return module
and then require it through the command bar while I am in script editor (and even when I am not) it just returns the previous error instead of running the the new , updated module’s code.
Why?
Do module scripts only update so their new code can be required only after you restart Studio or something?