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 » Scripting Helpers
Home Search
 

Re: Would this work? (On my phone)

Previous Thread :: Next Thread 
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
02 Nov 2014 09:40 AM
I just thought of this for my game so here it is:

while wait() do

wait()
x = 30

repeat

y = x-1
game.Workspace.Timer.SurfaceGui.Frame.TextLabel.Value = y
wait(1)

until y = 0 or game.Workspace.Background.Decal.Texture.Changed

end

This would be for a timer on a brick that counts down from 60 until it = 0 or the decal on another brick is changed. Then it restarts from 60 again until the same conditions occur.
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
02 Nov 2014 09:43 AM
Bump
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Nov 2014 09:45 AM
No but this would


local changed = false

Workspace.Background.Decal.Changed:connect(function() changed = true end)

while wait(0.03) do
changed = false
for x = 60, 1, -1 do
if changed then
break
else
wait(1)
workspace.Timer.SurfaceGui.Frame.TextLabel.Value = x --TextLabel.Value wut
end
end
end
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
02 Nov 2014 09:46 AM
Thanks, I'll test it when I'm home.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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