Okay, so I have this script for a close GUI. \
function onClicked()
Script.parent.parent.parent:Destroy()
end
script.Parent.MouseButton1Click:connect(onClicked)
What is wrong with it? When I click the X box, it doesn't close.
I tried this too, and it doesn't work either:
function onClicked()
Game.StarterGui.WelcomeGUI:Destroy()
end
script.Parent.MouseButton1Click:connect(onClicked)

1 comment
Thanks!