Hi guys.
I have got a need to recursively call a 2 module scripts. Cause Roblox don’t allows that, I have found that debug.info() can return function which called it. So, I used it, got function, and called it again with new parameters.
But can this lead to any bad outcomes?
--Module1
local M2 = require(module2)
local M1 = {}
function M1.Act(Data1, Data2)
--do smth
M2.Act(Data1, Data2)
end
return M1
--Module2
local M2 = {}
function M2.Act(Data1, Data2)
--do smth
debug.info(2, "f")(Data1, Data2)
end
return M2