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

How do you make it when you press the GUI and it erases until you respawn back?

I need this script if anyone can help me it would be a huge help!

2 answers

This goes inside the button of the GUI.

gui = script.Parent

gui.MouseButton1Click:connect(function()
	gui:Destroy()
end)

If you make the whole GUI visible at start, then I think this script should work, I wouldn't use :Destroy() since you might not be able to get it back:

-- Put this in the button and make sure the Button's Parent is a frame. Make sure that the Frame's Parent is a ScreenGui. You can rename the button, Frame and ScreenGui to whatever you want.

script.Parent.MouseButton1Click:connect(function()
	script.Parent.Parent.Visible = false
end)

Please tell me if this doesn't work, as I am in the middle of Beginners and Advanced scripting.

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