Misterx113
(Misterx113)
September 21, 2023, 4:58pm
#1
Hi, this has happened to me before and I have no idea why:
Serverscript:
game.Players.PlayerAdded:Connect(function(player)
print("PlayerAdded: ",player) --PlayerAdded: Misterx114
local retur = secundaryModule.AddPlayer(player)
[...]
Module Script:
local secundary = {}
function secundary:AddPlayer(player)
local re = false
print("AddPlayer: ",player) -- AddPlayer: nil
[...]
The given attribute is simply lost on the way, while it works for the same functions written the same way, called the same way, I am at a loss.
Crygen54
(Crygen)
September 21, 2023, 5:15pm
#2
Thatβs probably because you wrongly called the module function, as the function use β:β you also need to use β:β when calling it, without it the given argument return nil.
local retur = secundaryModule:AddPlayer(player)
1 Like
Misterx113
(Misterx113)
September 21, 2023, 5:19pm
#3
Oh, somehow i feel slightly stupid nowπ
system
(system)
Closed
October 5, 2023, 5:19pm
#4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.