Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Click, Gui Pops up, click again, Gui goes away. How do I do this?

This is what I have so far:

script.Parent.MouseButton1Click:connect(function() game.Players.LocalPlayer.PlayerGui.Button.Frame.Visible = true end)

But I don't know how to make it where you click it again it goes away..

1 comment

0

Thanks dyler3! :D

1 answer

script.Parent.MouseButton1Click:connect(function() 
if game.Players.LocalPlayer.PlayerGui.Button.Frame.Visible==true then
game.Players.LocalPlayer.PlayerGui.Button.Frame.Visible=false
elseif game.Players.LocalPlayer.PlayerGui.Button.Frame.Visible==false then
game.Players.LocalPlayer.PlayerGui.Button.Frame.Visible=true
end

Same idea really, just added 'if' statements.

This discussion is preserved as it was. New answers, comments, and votes are closed.