I’m calling a function from a module script via a server side script with the shown variables:
Table = a table from another module script
Player = Player
--Server script
local LoadCharModule = require(ServerScriptService.Modules.LoadCharacter)
LoadCharModule:Load(Player,Table)
--Module script
local module = {}
function module.Load(v,Player,Table)
print(v)
print(Player)
print(Table)
end
return module
Why is it creating another variable that I didn’t put in? This variable is represented by v
It’s because you’re firing it using a colon :, firing a function with a colon returns self into the first given parameter if it’s a function that uses . instead of :, in your case self is the module itself
More info about self, probably messed up a bit of my explanation but the fix is just to change
LoadCharModule:Load(Player,Table)
To
LoadCharModule.Load(Player,Table)
And remove the v parameter from the function in the module script