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

What is wrong with my script?[SOLVED]

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

I am trying to make when you click the textbutton it will destroy after 5 seconds.

1 answer

✓ Accepted answer

this should work...

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

script.Parent.MouseButton1Down:connect()

6 comments

0

I did that and didn't work + I updated the script, still does nit work.

0

ok i just edited the answer it should work now

0

thx

0

no problem! :D

0

It shows the error line under Test()

0

Did you guys note the function needs a end? So under script.Parent.TextButton:Destroy() put a end.

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