|
| 29 Oct 2013 11:45 AM |
When I click the textbox it doesn't start the countdown there is no output to..
local time = 30 function onClick() for i = 1,30 do wait(1) time = time - 1 script.Parent.Text = tostring(time) end end script.Parent.Click:connect(onClick)
|
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 29 Oct 2013 11:47 AM |
| Text Boxes cannot be clicked on. They do not have that function. |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2013 11:50 AM |
| Ooops sorry i meant textbutton |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 29 Oct 2013 11:53 AM |
Maybe like this? (Connection line fixed)
local time = 30 function onClick() for i = 1,30 do wait(1) time = time - 1 script.Parent.Text = tostring(time) end end script.Parent.MouseButton1Down:connect(onClick)
If it won't work try replacing tostring(time) with "" ..time |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2013 11:53 AM |
TextButton doesn't work what do i use?
|
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 29 Oct 2013 11:56 AM |
Try this, I removed "local" because you do not use multiple time defining in many functions and I've also replaced the text.
time = 30 function onClick() for i = 1,30 do wait(1) time = time - 1 script.Parent.Text = "" ..time end end script.Parent.MouseButton1Down:connect(onClick) |
|
|
| Report Abuse |
|
|
| |
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 29 Oct 2013 12:18 PM |
time = 30 function onClick() for i = 30, 1 do wait(1) time = time - i script.Parent.Text = "" ..time end end script.Parent.MouseButton1Down:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2013 12:25 PM |
| Quick question, does this have to be in a script or Local script? |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
| |
|