I want to be able to loop in the exact order the dictionaries are written or maybe give them some sort of a “order”, I am confused on how to be able to achieve such a thing.
My module:
local modes = {
["Kaioken"] = {
Name = "Kaioken";
Boost = 1;
Color = Color3.fromRGB(255, 0, 0);
---
Attack = 7000;
Agility = 7000;
Ki = 7000;
};
["SSJ"] = {
Name = "Super Saiyan";
Boost = 3;
Color = Color3.fromRGB(255, 231, 111);
---
Attack = 25000;
Agility = 25000;
Ki = 25000;
};
}
return modes
The looping:
-- Modes
for i, v in ipairs(ModesData) do
local meleeName = i
local button = button:Clone()
button.Name = v.Name
button.Text = v.Name
button.Visible = true
button.Parent = dojoframe:WaitForChild("ModesFrame")
button.MouseButton1Click:Connect(function()
selectingSkillGUI(v,"Modes","Selected","Select")
end)
end