I used this script to have it close:
1 print ("Close button loaded") 2 3 button = script.Parent 4 window = script.Parent.Parent.Parent 5 6 function onClicked(GUI) 7 window:Destroy() 8 end 9 script.Parent.Mousebutton1Click:connect(onClicked)
I HAVE NO IDEA HOW TO DO IT! (and yes i'm using a textbutton not a textbox
please tell me how to make a gui closing gui or what im doing wrong.
script.Parent.MouseButton1Down:connect(function() --make sure the script is inside the textbutton script.Parent.Parent:Destroy() -- do script.Parent.Parent.Parent until you get to the ScreenGui object end)
Hope I helped!