Hi! I am trying to make it so the GUI disappear the second time you click it. (it opens the first time you click it). I thought that if I added an “if” it would work, but instead it just stays open instead of staying shut at the beginning.
“Info” is the image of info, and “OpenInfo” is the button!
Thank you for helping me ![]()
local OpenInfo = script.Parent
Info.Visible = false
OpenInfo.Visible = true
script.Parent.MouseButton1Click:Connect(function()
Info.Visible = true
end)
if Info.Visible = true
script.Parent.MouseButton1Click:Connect(function()
Info.Visible = false
)