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

What is wrong with my script?[SOLVED]

Asked by 11 years ago
1function Test()
2Gui.MouseButton1Down:connect(function()
3  print("WORKS")
4    wait(5)
5    Script.Parent.TextButton:Destroy
6Test()

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

1 answer

Log in to vote
-1
Answered by
LAC44 20
11 years ago

this should work...

1function Test()
2Gui.MouseButton1Down:connect(function()
3  print("WORKS")
4    wait(5)
5    Script.Parent.TextButton:Destroy
6Test()
7 
8script.Parent.MouseButton1Down:connect()
0
I did that and didn't work + I updated the script, still does nit work. FancyClone 0 — 11y
0
ok i just edited the answer it should work now LAC44 20 — 11y
0
thx FancyClone 0 — 11y
0
no problem! :D LAC44 20 — 11y
View all comments (2 more)
0
It shows the error line under Test() FancyClone 0 — 11y
0
Did you guys note the function needs a end? So under script.Parent.TextButton:Destroy() put a end. fireboltofdeath 635 — 11y
Ad

Answer this question