In a part of a script I have:
_G.Army = {}
_G.Army[1] = {
Morale = 100,
MP = 100
}
In another LocalScript I have:
local LocalPlayer = game.Players.LocalPlayer
local Tool = LocalPlayer.Backpack.Tool
Tool.Activated:connect(function()
local NewArmy = table.insert(_G.Army, #_G.Army + 1, "Placeholder")
end)
The problem I am experiencing is, how do I add multiple lines for the value of the element when I run table.insert? So instead of putting just "Placeholder" for the next _G.Army[2], I can use the template:
Morale = 0,
MP = 0

2 comments
tbl['NAME'] = VALUE?local NewArmy = table.insert(_G.Army, #_G.Army + 1, {Morale = 0, MP = 0})