Hi, im trying to pass some values in module but it keep printing unexpected stuff.
Here is my code (Not module script) local plrlist, nonPlrList, AllCharList = DTModule:PlayersInRange(bullet.Position, 12)
(Module script)
local module = {}
function module.PlayersInRange(Origin, range)
local plrlist, nonPlrList, AllCharList = {}, {}, {}
print(Origin) --prints {["PlayersInRange"] = "function", ["ShowDmg"] = "function"}
end
return module
why is the first valie (Origin) not vector3 (Bullet.Position)?
When you use module:Function() when module.Function() is written, the first value is self, the same table as the module, call it as it is originally written