So in this picture, I made a Gui and surfaceGui for a button.
But how do I make it where the Surfacegui Button gets clicked on and you see the gui frame?
Like this is what I am doing:
https://gyazo.com/d422970e61dc15319c46ce19cca33140 https://gyazo.com/d422970e61dc15319c46ce19cca33140
And even so, I use a script like this to somehow open the main frame from the Gui.
This script is in the Surfacegui button here:
If you don't know the application teleporter that's the thing I am doing on the surface Gui. https://gyazo.com/14f3513c11a83960c1f68e030eb559b5
local Button = script.Parent
Frame = script.Parent.Parent.Main
function onClick()
if Frame.Visible == false then
Frame.Visible = true
elseif Frame.Visible == true then
Frame.Visible = false
end
end
Button.MouseButton1Click:connect(onClick)
And now I want the button for the Gui here. https://gyazo.com/726c1b6942e41e389ffec4134524e1ae
And now I wanted the frame when it is open it closes https://gyazo.com/53d4ae7ca1735c0583e1defa073e8902
And here is the Button where It closes. https://gyazo.com/c7891517cfabb7fd4c62b188f62ddb00
So I guess that is all.

1 comment
It looks like working code to me. Could you explain what's wrong?