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

How to make a close button on a Screen Gui?

I was never good at guis or liked them so I just need a little help on how to make a close button on a pop up Gui that shows when you click on a brick. I've tried using click detectors but then I realized those only work on bricks :P. Thanks in advance.

1 answer

✓ Accepted answer

Very Easy!

This Hides the frame

--this only hides the frame
local frame = script.Parent.Parent.YOURFRAME --Insert more Parent if it wont show up

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

This Destroys the Gui completely

local gui = script.Parent.Parent.Parent.Parent.YOURGUI -- Insert more Parent if it wont show up
script.Parent.MouseButton1Click:connect(function()
	gui:Destroy()
end)

2 comments

0

i don't really have experience with guis tho lmao thanks so much tho!

0

ur welcome bro

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