Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

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

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

script.Parent.MouseButton1Down:connect()

1 answer

Log in to vote
0
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
10 years ago

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.
0
no text button in textbutton FancyClone 0 — 10y
0
plus the 'end)' has a error line under it. FancyClone 0 — 10y
0
M39 so this is the copy used in the question I just answered? HexC3D 830 — 10y
0
Yes. M39a9am3R 3210 — 10y
Ad

Answer this question