For some really strange reason in the portion of my script that returns data to other scripts, it always says the “Player” argument is nil even if it is called with the area filled.
function module.Get(p)
print(p.Name)
local profile = Profiles[p]
if profile then
print("yeah")
return profile
else
return module.WaitForProfile(p)
end
end
This is the portion in the data module
and here is the other part in the loading script
local ProfileService = require(game.ServerScriptService.DataApi)
Players.PlayerAdded:Connect(function(Player)
print(Player.Name)
local profile = ProfileService.Get(Player)
I found the issue. I was calling my module functions using : instead of a .
For some reason that was making all the arguments return nil. Thanks, though?