I tried some code for my close button, and it had minor glitches on studio but shut down the game on roblox???
1 | button = script.Parent.Parent.Parent |
2 | window = button.Parent.Parent.Parent |
3 |
4 | function onClicked(GUI) |
5 | window:remove() |
6 | end |
7 | script.Parent.MouseButton 1 Click:connect(onClicked) |
I believe the best solution is:
1 | script.Parent.Parent.Parent.MouseButton 1 Click:connect( function () |
2 | script.Parent.Parent.Parent.Parent.Parent.Parent.Visible = false |
3 | end ) |