I am trying to pass arguments through a function using indexing and the first argument always turn into nil.
--module
local module = {}
function module:Test(a,b,c)
print(a,b,c)
end)
--serverscript
local module = require(script.Parent.ModuleScript)
module['Test']('a','b','c')
a:b(c) is sugar syntax for a.b(a, c). a.b is sugar syntax for a["b"]. So you need to call with a colon or pass module as the first argument. Don’t define all module functions with the colon, this sugar syntax makes passing the function as an argument to another function a pain.