Hi! I have been trying to code a button so that when it is pressed, it disappears off the screen, while the GUI is still enabled, for all the players on the server. Here is my code. (I'm only a beginner, so help is greatly appreciated!)
This script is a child of the button.
script.Parent.MouseButton1Click:Connect(function() script.Parent.DisableGUI = true script.Parent.Active = false end)
I'm assuming that you just want the ClickDetector gone?
script.Parent.MouseButton1Click:Connect(function() script.Parent.DisableGUI = true script.Parent:Destroy() end)
This will delete the ClickDetector completely if you want to have it so you could reenable it you could go multiply ways of doing so. If you wanted the ClickDetector gone completely and then readded you could always have the script located somewhere else and checking when it's not nil and nil. Otherwise, you could also disable the script. With a second script. ( I know there is probably better ways of doing this )