Actually I just created a basic script to do this
Here is how I set it up
and here is the code in the local script which is inside the UI
game.Workspace.ClickMe.ClickDetector.MouseClick:Connect(function()
script.Parent.Frame.Visible = not(script.Parent.Frame.Visible)
end)
ClickToShowButton.rbxl (19.9 KB)
It is in a local script. . . ,
I also want to have a X button on the GUI.
Ok, so you would do the same thing but add an XButton
New Code
game.Workspace.ClickMe.ClickDetector.MouseClick:Connect(function()
script.Parent.Frame.Visible = not(script.Parent.Frame.Visible)
end)
script.Parent.Frame.XButton.MouseButton1Click:Connect(function()
script.Parent.Frame.Visible = not(script.Parent.Frame.Visible)
end)
ClickToShowButton.rbxl (21.8 KB)
3 Likes
It worked! Thank you so much! Thank you guys for helping.