-
**What do you want to achieve?**I am trying to make it where there is a scrolling frame, and each gui that is added to that is listed into a text box.
-
**What is the issue?**I can’t find anything on it in developer forum
-
What solutions have you tried so far? Have not tried any, I do not know how to do it.
1 Like
I believe the only way to is to create variables for all the visible UIs.
local Part1 = game.Workspace.Part1
local Part2 = game.Workspace.Part2
local Part3 = game.Workspace.Part3
local WorkspaceTable = {Part1, Part2, Part3}
if Part2.Parent == game.ServerStorage then
local NewWorkspaceTable = {Part1, Part3}
end
You could get all the children of the player’s Gui that are screen guis
local visibleGuis = {}
for _, gui in ipairs(game.StarterGUI.ScreenGUI:GetChildren()) do
if gui.Visible then
table.insert(visibleGuis, gui)
end
end
Maybe you can try to do this?
1 Like
I wouldnt get the screengui from the startergui, instead it should either get the screengui from the playergui, or just do script.Parent:GetChildren if that script is in that screengui.
I don’t really know how to split tables and then put that in a text box, but @SosaYuzu’s script will work.
fixed version of her/his script:
local visibleGuis = {}
for _,gui in pairs(script.Parent.ScrollingFrame:GetDescendants()) do
if gui.Visible == true then
table.insert(visibleGuis, gui)
print(visibleGuis)
end
end
Simple, for loop
Variables
local scrolFrame = -- Where is your Frame? Add it here
local button = -- Specify button also
button.MouseButton1Click:Connect(function()
for i, v in pairs(scrolFrame:GetDescendants()) do -- If only the main thing you want inside the frame is invisible, do :GetChildren()
if v:IsA("GuiObject") and not v:IsA("ScreenGui") then -- Added ScreenGui just in case...
v.Visible = true
end
end
end)