function Test() Gui.MouseButton1Down:connect(function() print("WORKS") wait(5) Script.Parent.TextButton:Destroy Test() --Here.... script.Parent.MouseButton1Down:connect()
Edit - Oh derp, for this function, don't have it inside a unrunnable function.
--function Test() This is not needed. script.Parent.MouseButton1Down:connect(function() print("WORKS") wait(5) script.Parent:Destroy() --Lua is case sensitive, it's a lowercase script. Is there a textbutton in a textbutton? Edit; Forgot that Destroy was a method, it should have parenthesis after it. end) --You needed to end the function. And add a ) to the end to finish the function.