I was trying to store the player's info and trying to get it to print it. Attempting to print it produced an error.
--The Server Code
local function getPlayerInfo()
local AvatarInfo = Players:GetHumanoidDescriptionFromUserId(plr.UserId)
local PolicyInfo =PolicyService:GetPolicyInfoForPlayerAsync(plr)
local Info = {
Name = plr.Name,
UserId = plr.UserId,
Avatar = AvatarInfo,
PolicyInfo = PolicyInfo,
Region = LocalizationService:GetCountryRegionForPlayerAsync(plr),
Data = {
GroupData = GroupData,
LevelData = LevelData,
BanData = BanData
}
}
return Info
end
local playerInfo = getPlayerInfo()
PlayerInfo.Register(plr.Name, playerInfo)
print(PlayerInfo.Get(plr.Name).Name)--The error
--The module's code
local PlayerInfo = {}
return {
Register = function(key, value)
PlayerInfo[key] = value
print("[PlayerInfo]: "..key.." has been registered")
end,
Request = function(key)
return PlayerInfo[key]
end
}

1 comment
Can you supply the error message? You're likely trying to access a function or value that doesn't exist in
PlayerInfo