Why won't this work?

  1. What do you want to achieve? Keep it simple and clear!
    I’m trying to make multiple guis become visible at the same time.
  2. What is the issue? Include screenshots / videos if possible!
    The guis won’t turn visible.

The guis are in a folder inside of the gui, and I am using GetChildren() to grab them all at once.

Here is how I did it;

local Buyables = script.Parent.Parent.Buyables:GetChildren()
Buyables.Visible = true

The script is a local script inside of the button that is supposed to make them show.

1 Like
for i, v in pairs(Buyables) do
    v.Visible = false
end

:GetChildren returns a table, so we have to run a for loop through it.

You could also just put the Buyables into a Frame and make the Frame not visible

1 Like

Its pretty simple all you want to do is this:

local Buyables = script.Parent.Parent.Buyables:GetChildren()

for i, v in pairs(Buyables) -- you can also do pairs(script.Parent.Parent.Buyables:GetChildren())
 v.Visible = false
end
1 Like