#GUI screwed over

1 messages · Page 1 of 1 (latest)

golden adder
#

I need help with a pretty simple problem

#

SO this is my non edied GUI for now

#

I already edited it so when you press eachbutton another list of GUI's pop up

#

and if you press multiple they all overlap

#

I wahnt to make it so when 1 is clicked, reverting to another makes the previous sub GUI disapear and the new one reappears

golden adder
#

for the new guis poping up from the buttons?

#

@plush storm So the script on the left is mirrored in each subclass folder's script

plush storm
#

you could try to make it so it gets script.parent.parent:WaitForChild("Meelee") and the other buttons etc, and then check if they are visible, if so, make them invisible

golden adder
#

hmmm

#

i dont know how to do that though

#

@plush storm could you try showing me a example?

plush storm
#

local meelee = script.Parent.Parent:WaitForChild("Meelee")
local ranged = script.Parent.Parent:WaitForChild("Ranged")

button.activated:connect(function()
meelee.Visible = false
ranged.Visible = false
script.parent = visible
end)

golden adder
#

hmmmm

#

so in the script for each folder I would choose 1 of the classes to be visible but the others to be invisible?

#

This would have to be the parent for all the classes then no?

plush storm
golden adder
#

hmmm okay

#

so I would define each classes GUI, and then make it so its parent is visible?

#

okay okay

#

and wait a second

scenic wren
#

i can show you an example if needs be

golden adder
#

does the (local) work for something that isnt in its parent?

#

like lemme show you

golden adder
#

let me try it

scenic wren
#
local button1 = script.Parent:WaitForChild("TextButton1")
local button2 = script.Parent:WaitForChild("TextButton2")

local frame1 = script.Parent:WaitForChild("Frame1")
local frame2 = script.Parent:WaitForChild("Frame2")

button1.Activated:Connect(function()
    frame1.Visible = true
    frame2.Visible = false
end)

button2.Activated:Connect(function()
    frame1.Visible = false
    frame2.Visible = true
end)
#

example i made

golden adder
#

let me try this out

left shuttleBOT
#

studio** You are now Level 6! **studio

golden adder
#

ty

scenic wren
#

i wouldnt name the variables frame1,2,3 etc

#

for readability and debugging in the future

#

but it does work

golden adder
#

and now another issue i face

#

the GUI's wont even open

#

@scenic wren So look

#

its visible and its transparency is not max

#

why can i not see it pop up

plush storm