Extra variable in module script function

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

image

what is this
were is the v


I did explain the variables

Input variables

Table = a table from another module script
Player = Player

Output variables

v = ? didnt input this shouldn’t exist
Table = a table from another module script
Player = Player

Thats what I’m trying to figure out where is v why does it exist

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

2 Likes