I'm attempting to create a dictionary of player statistics, such as kills, deaths and money, but when I attempt to print said values, it returns nil. I've attempted "pcall" as well as the documentation on the ROBLOX wiki, but this was unable to help.
local myTable = {
TheHospitalDev = {
["kills"] = 10,
["deaths"] = 1,
["money"] = 10000},
OtherPlayer = {
["kills"] = 1,
["deaths"] = 10,
["money"] = 1000},
}
local function displayInfo()
for index,value in pairs(myTable) do
print(index,"has:")
print("...Kills:",myTable[value[1]])
print("...Deaths:",myTable[value[2]])
print("...Money:",myTable[value[3]])
print("Total:",myTable[value])
end
end
local success,message = pcall(displayInfo)
if success then
print("Success")
else
print("Error:",message)
end
Thank you in advance
