1 | function Test() |
2 | Gui.MouseButton 1 Down:connect( function () |
3 | print ( "WORKS" ) |
4 | wait( 5 ) |
5 | Script.Parent.TextButton:Destroy |
6 | Test() |
I am trying to make when you click the textbutton it will destroy after 5 seconds.
this should work...
1 | function Test() |
2 | Gui.MouseButton 1 Down:connect( function () |
3 | print ( "WORKS" ) |
4 | wait( 5 ) |
5 | Script.Parent.TextButton:Destroy |
6 | Test() |
7 |
8 | script.Parent.MouseButton 1 Down:connect() |