In short I have this script that add certain effects to the player in this sort of example:
["Oxygen Low"] = {
0,
0.1,
500,
30,
{
{"Shortness Of Breath", 1, 17, 100, 25, false},
{"Respitory Arrest", 100, 100, 100, 350, false},
{"Cardiac Arrest", 100, 100, 100, 370, false},
},
15,
nil,
{
0
},
"Low Oxygen",
Vector2.new(5,4),
40,
"Restless anxiety and headaches hint at low blood oxygen levels."
},
Now I want to grab an item from a table along with its Variable name, as shown here:
Currently in this screenshot I am just printing out the entire table but I want to print out just one singular value. If I would to write print(Afflictions["Oxygen Low"]
) it would print out only its contents:
How do I make the script print out not only its contents but also the variable name as shown in the first screenshot?