How can I refer to an GuiElement without listing all its child names?
Posted: Tue Nov 06, 2018 3:16 pm
Instead of this:
Something like that:
I saw that there is "children" and "children_names", but I do not know how to use them.
Code: Select all
function on_click(event)
local name = event.element.name
for i, str in pairs(global.whatever) do
if name == 'button'..i then
player.gui.center.frame_1.frame_2.frame_3.flow['button'..i].enabled = false
end
end
endCode: Select all
function on_click(event)
local name = event.element.name
for i, str in pairs(global.whatever) do
if name == 'button'..i then
event.element.name.enabled = false
end
end
end