Trying to make a frame visible when a button is clicked

Can someone help me with this?
image
image
Im trying to make the Uniform Frame Visible when the button is pressed
(im not much of a scripter)

1 Like

You are probably confusing Roblox when you have Open as the parameter for MouseButton1Click. Just change this line

Button.MouseButton1Down:Connect(function(open)

Change to:
Button.MouseButton1Down:Connect(function()

2 Likes

Thank you for this! just tried it and it worked

1 Like

Glad it works :slight_smile: !

1 Like

ok, I just found another problem.
image
The GUI’s are working fine and can open
But when I open another GUI like the animations it overlays. how do I make it so only one gui can be open at a time?
image

1 Like

Above the line of code that makes the frame visible when they click it, just change the other frames’ visibility to false.

1 Like

how would i do this when the frames are separate image

You could make a new variable for each one, or you could do the following. Also I’m sorry for the horrible formatting, I am currently on mobile.

for I, v in pairs(script.Parent.Parent:GetDescendants()) do
If v:IsA(“Frame”) and v ~= GUI then
v.Visible = false
end

end)

The guis dont open now?
image
is this the correct way
do i have to makeany variables?

Loop through all of the frames and set their visibility to false.

Make the one you want’s visibility to true.