So I have been working on a flowgraph GUI and I am running in to an issue. When you click a button you can connect to a gui collection that hides all gui elements (in this example, 3 buttons) of a certain category. Everything works fine except when I add another gui collection to the scene.
Works fine..
Once I add a new gui collection to the scene (also 3 buttons in the image), all 6 buttons hide the second gui collection, although the first 3 buttons are not connected to the second GUI collection.
The problem must lie somewhere in the buttons array that I use to store the buttons. Buttons are added to this array on startup by looking through a gui collections children. I tried using both
Script.buttons = {}
--in start
--store children as buttons
self.childrenCount = self.entity:CountChildren()
for i=1, self.childrenCount, 1 do
self.buttons[i] = self.entity:GetChild(i-1)
end
as well as:
local buttons = {}
--in start
--store children as buttons
self.childrenCount = self.entity:CountChildren()
for i=1, self.childrenCount, 1 do
buttons[i] = self.entity:GetChild(i-1)
end
Any ideas?