The "table way" is actually pretty straight forward, here is a simple example:
local guiStuff = {}; --create the table.
guiStuff[ #guiStuff + 1 ] = guiCreateStaticImage("IMAGE1", x, y); --#guiStuff > gets the total number of items in the table and we add one so basically we do [0 + 1] then [1 + 1], [2 + 1] and so on..
guiStuff[ #guiStuff + 1 ] = guiCreateStaticImage("IMAGE2", x, y);
guiStuff[ #guiStuff + 1 ] = guiCreateStaticImage("IMAGE3", x, y);
guiStuff[ #guiStuff + 1 ] = guiCreateStaticImage("IMAGE4", x, y);
--so on as many times you want....
for index = 1, #guiStuff do
guiSetVisible(guiStuff[index], true);
end
--you can also acces any of the above like this
guiSetVisible(guiStuff[3], false);
--if you are sure of the index
--imagine the table like this:
local guiStuff = {
[1] = guiCreateStaticImage("IMAGE1", x, y),
[2] = guiCreateStaticImage("IMAGE2", x, y),
[3] = guiCreateStaticImage("IMAGE3", x, y),
[4] = guiCreateStaticImage("IMAGE4", x, y),
};