Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with scripting a Surface GUI with another Surface GUI through Scripts?

Asked by 9 years ago

Hi,

I am making a button (Surface GUI Button) so that when I press it, it will hide 1 thing and open the other. So I have Screen 1 (S1) and Screen 2 (S2) and Screen 3 (S3). S1 is the starting screen, I press S2 button and S2 will show up and S1 will be made invisible. BUT when I press S3 it stops at making S1 invisible because it already is invisible. So how do I get it to skip the A1 part if it is already invisible.

The script so far is;

function Click(mouse)
game.Workspace.StageScreen1.SurfaceGui.GuiHolder1.Visible = true
game.Workspace.StageScreen1.SurfaceGui.GuiHolder.Visible = false

end

script.Parent.MouseButton1Down:connect(Click)

What would the script be, if I wanted the script /\ to only make 'GuiHolder.visible = false' if needed.

Thanks, Please just ask if you want more info.

Answer this question