generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How do i Edit this?

Previous Thread :: Next Thread 
FrictionAddiction is not online. FrictionAddiction
Joined: 25 May 2013
Total Posts: 146
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
FrictionAddiction is not online. FrictionAddiction
Joined: 25 May 2013
Total Posts: 146
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
FrictionAddiction is not online. FrictionAddiction
Joined: 25 May 2013
Total Posts: 146
07 Aug 2015 05:48 PM
Bump, any help?
Report Abuse
FrictionAddiction is not online. FrictionAddiction
Joined: 25 May 2013
Total Posts: 146
07 Aug 2015 06:07 PM
Bump. Anyone? :C
Report Abuse
FrictionAddiction is not online. FrictionAddiction
Joined: 25 May 2013
Total Posts: 146
07 Aug 2015 06:26 PM
Bump
Report Abuse
TimeTicks is not online. 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
FrictionAddiction is not online. FrictionAddiction
Joined: 25 May 2013
Total Posts: 146
07 Aug 2015 08:29 PM
I dont know the code for that, or i would. Bump , does anyone know the code?
Report Abuse
FrictionAddiction is not online. FrictionAddiction
Joined: 25 May 2013
Total Posts: 146
07 Aug 2015 08:38 PM
Bump, any help? Much Appericated!
Report Abuse
FrictionAddiction is not online. FrictionAddiction
Joined: 25 May 2013
Total Posts: 146
07 Aug 2015 08:50 PM
Bump. :/
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image