Hi, I made this table and function:
local playerDataCache = {}
--Data
local default = { isRedacted = nil, Icon = nil }
--Function to cache data
function CacheData(Player)
local IsRedacted = Player:WaitForChild("IsRedacted")
local IdealIcon = Player:WaitForChild("LeaderboardIcon")
local IdealIconValue = IdealIcon.Value
playerDataCache[Player.UserId] = default
playerDataCache[Player.UserId].isRedacted = IsRedacted.Value
if IdealIconValue ~= "None" then
playerDataCache[Player.UserId].Icon = IconsModule.IdealIconValue
end
print(playerDataCache)
end
But the problem is, when I print it, it prints this:
{
[2908787387] = ▼ {
[“isRedacted”] = IsRedacted
}
}
It leaves out the icon, any ideas why?