I don't know why, but I literally forgot how to do that. I use __index for all my modules, but it is just doing setmetatable(table,{__index = table)})
so I don't remember how to set up the actual function. It was something like this:
local tab = {} local tabMT = { function tab.__index() return 1 end }
however, it does not work.
__index is set up like so:
local tab = {} local mt = { __index = function() return 1 end } setmetatable(tab,mt) -- and you can setmetatable, idk if you forgot to do that but just leaving it here