function Test()
Gui.MouseButton1Down:connect(function()
print("WORKS")
wait(5)
Script.Parent.TextButton:Destroy
Test() --Here....
script.Parent.MouseButton1Down:connect()
COMMUNITY QUESTION
Function argument expected near 'Test'? [NOT SOLVED]
1 answer
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
no text button in textbutton
plus the 'end)' has a error line under it.
M39 so this is the copy used in the question I just answered?
Yes.