I have made a GUI for my game. But everytime when I hit play on my GUI it doesn't close down that GUI. Can someone fix the script of it. I got part of it, but it isn't working. http://www.roblox.com/GUI-item?id=183072897
✓ ANSWER ACCEPTED
Help me with Welcome GUI. Can someone help me?
1 answer
✓ Accepted answer
I have checked out your script, there was nothing wrong with it, but I edited it anyway;
print("Gui Closer Located and initiated.") --This worked
local function onClicked(GUI) --Before, you didn't use 'GUI'
if GUI then --This checks if 'GUI' exists
GUI:Destroy() --This will Destroy the 'GUI'
end --This ends the code block for the 'if' statement
end --This ends the code block for the function
script.Parent.MouseButton1Down:connect(function() --This will, eh, I forgot, but this will connect the Event to the function
onClicked(script.Parent.Parent.Parent) --When the TextButton is clicked, it'll destroy the GUI
end) --This ends the code block for the Event/function
Another thing I noticed was that you were using a 'Script' type instance for the GUI, Roblox did an Update so that you [I think] can only use 'LocalScript' type instances for Client-Sided scripts, so, try using a 'LocalScript' for your Script, and maybe it'll work. :) Hope this helped!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thank you TheAlphaStigma. I haven't tried yet, but I am glad I got an answer from you and you helped me out. May God bless you.
No problem :) I was glad to help you out. :)