local magics = { -- ["Name"] = {"Rarity"}
	
["Fire"] = {"Common"};
["Water"] = {"Common"}; 
["Wind"] = {"Common"}; 
["Bubble"] = {"Common"; 
["Ice"] = {"Rare"}; 
["Plasma"] = {"Rare"}; 
["Metal"] = {"Rare"}; 
["Speed"] = {"Rare"}; 
["Sound"] = {"Rare"};
["Earth"] = {"Rare"}; 
["Wood"] = {"Rare"};
["Poision"] = {"Rare"}; 
["Lava"] = {"Epic"}; 
["Illusionist"] = {"Epic"};
["Portal"] = {"Epic"};
["Explosion"] = {"Epic"}; 
["Energy"] = {"Epic"};
["Lightning"] = {"Epic"}; 
["Light"] = {"Mythical"};
["Dark"] = {"Mythical"};
["Space"] = {"Mythical"};
["Solar"] = {"Mythical"}

	
	
}}

I made this array and want to pick a random "Name" and also print that Names rarity. I am new to arrays and anything I try would not work. Thanks for any help.

3 comments

0

I already tried this method and it would only print 1 Name and only 1 not randomly

0

local _, v = next(magics)