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
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!