DevRaph
(DevRaph)
December 19, 2021, 9:04am
#1
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
DevRaph
(DevRaph)
December 19, 2021, 9:13am
#3
Sorry bro, didn’t work. Thanks for trying
Does it have any error ?
Show me your console.
DevRaph
(DevRaph)
December 19, 2021, 9:34am
#5
It had no errors I’m pretty sure it just didn’t work
I can’t see it.
It said Access is denied.
Emskipo
(Emskipo)
December 19, 2021, 9:36am
#7
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
DevRaph
(DevRaph)
December 19, 2021, 9:40am
#9
I know but I’m wondering how to make it so when I press this button
These frames become visible
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
DevRaph
(DevRaph)
December 19, 2021, 9:48am
#11
You can’t set Screen guis to invisible only frames
No i mean
Set Enabled one.
Zentryte
(Zentryte)
December 19, 2021, 9:52am
#13
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
DevRaph
(DevRaph)
December 19, 2021, 9:55am
#14
Didn’t work sorry. Thanks for trying
Zentryte
(Zentryte)
December 19, 2021, 10:00am
#15
it should’ve
Frame Open.rbxl (36.4 KB)
try copying from this place I just made
Zentryte
(Zentryte)
December 19, 2021, 10:12am
#17
try setting display order higher? maybe they are showing under it.
DevRaph
(DevRaph)
December 19, 2021, 10:15am
#18
As you can see all the frames are invisible and I put the script in the button
Zentryte
(Zentryte)
December 19, 2021, 10:15am
#19
If you set you GUI to enabled in studio do they show?
if not try setting displayorder higher
DevRaph
(DevRaph)
December 19, 2021, 10:16am
#20
oops wrong link. I’ll see if thatll work