|
| 07 Aug 2015 05:34 PM |
I want this to reset when it is touched again. When the part is touched, how do i make it so when touched again it resets back to the starting number? Help is appericated!
local startTime = 20 local saveStartTime = startTime local db = false
script.Parent.TouchPart.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and not db then db = true while startTime > 0 do script.Parent.TimerPart.SurfaceGui.Time.Text = "Time[" .. startTime .. "]" startTime = startTime -1 wait(1) end script.Parent.TimerPart.SurfaceGui.Time.Text = "Time is up!" startTime = saveStartTime wait(1) db = false end end) |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2015 05:36 PM |
| Forgot to add that this is a Different part that has the timer on it, and the touched part is seprate |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 07 Aug 2015 06:27 PM |
you just tell the script to reset the number again.
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2015 08:29 PM |
| I dont know the code for that, or i would. Bump , does anyone know the code? |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2015 08:38 PM |
| Bump, any help? Much Appericated! |
|
|
| Report Abuse |
|
|
| |
|