I found something that looked similar to C++ structs that could work in Roblox lua. I was just wondering how someone could be able to retrieve the data with its corresponding data (if that makes any sense)?
For example:
local playersStatsArray = {};
local playersStats;
-- Make player stats and add them into playerStatsArray
for i, v in pairs(players) do
playerStats = {
["name"] = game.Players:FindFirstChild(v), ["money"] = 100;
}
end
Say we have a player named “Hello123” and another player named “Bye123”, how could we retrieve the ‘money’ stats from both of these players?