How do I fix this GUI Button?

I need help making this GUI button open multiple frames in a screen GUI (There parented)

So I need a script to make the selected frames open when I click the PC image button

This is the script in the PC image button (FrameScreen Is the parent of the frames I want to open and is a screen GUI)

Try this

script.Parent.MouseButton1Down:Connect(function()
	for i,v in pairs(script.Parent.Parent.FrameScreen:GetDescendants()) do
		v.Visible = true
	end
end)

1 Like

Sorry bro, didn’t work. Thanks for trying

Does it have any error ?
Show me your console.

It had no errors I’m pretty sure it just didn’t work

I can’t see it.
It said Access is denied.

You’ll need to reference the “PlayerGui” to begin.

All of your different “ScreenGui” instances are parented to this directory.

So when your image is clicked…

PlayerGui.FrameScreen.Enabled = true --If its not already...
PlayerGui.FrameScreen.Frame60.Visible = true --If its not already visible
PlayerGui.FrameScreen.Frame60.Frame20.Visible = true

Once that first frame is visible, your “arrow” buttons will shift through the different frames like before.

2 Likes

I know but I’m wondering how to make it so when I press this button

PC Simulator - Roblox Studio 19_12_2021 8_38_19 PM (2)

These frames become visible

PC Simulator - Roblox Studio 19_12_2021 8_38_58 PM (2)

Actually just set all of Frame visible to true

and set FrameScreen visible to false
and when player press the button
make it set FrameScreen to visible

script.Parent.MouseButton1Down:Connect(function()
	script.Parent.Parent.Parent.Parent.FrameScreen.Enabled = true
end)```

try this again

You can’t set Screen guis to invisible only frames

No i mean
Set Enabled one.
image

local Frames = script.Parent.Parent.Parent.Parent:WaitForChild("FrameScreen") -- Add or remove a .Parent if you needed

script.Parent.MouseButton1Click:Connect(function()

Frames.Enabled = true

end)

If you need to close it you can set true to false

2 Likes

Didn’t work sorry. Thanks for trying

it should’ve

Frame Open.rbxl (36.4 KB)

try copying from this place I just made

try setting display order higher? maybe they are showing under it.

As you can see all the frames are invisible and I put the script in the button

If you set you GUI to enabled in studio do they show?

if not try setting displayorder higher

image

oops wrong link. I’ll see if thatll work