Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Function argument expected near 'Test'? [NOT SOLVED]

function Test()
Gui.MouseButton1Down:connect(function()
  print("WORKS")
    wait(5)
    Script.Parent.TextButton:Destroy
Test() --Here....

script.Parent.MouseButton1Down:connect()

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.

4 comments

0

no text button in textbutton

0

plus the 'end)' has a error line under it.

0

M39 so this is the copy used in the question I just answered?

0

Yes.

This discussion is preserved as it was. New answers, comments, and votes are closed.