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: For loops

Previous Thread :: Next Thread 
ScriptGuilder is not online. ScriptGuilder
Joined: 07 Aug 2014
Total Posts: 848
13 Oct 2014 05:17 PM
c = game.ServerStorage.Intermission:clone()
c.Parent = player.PlayerGui
for timer = 10, 0, 1 do
for _, v in pairs(game.Players:GetPlayers()) do
if (v['PlayerGui']) then
v['PlayerGui'].Intermission.Frame.TextLabel.Text = timer
wait(1)
end
end
end

Why isn't this counting down?
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
13 Oct 2014 05:18 PM
c = game.ServerStorage.Intermission:clone()
c.Parent = player.PlayerGui
for timer = 10, 0, 1 do
for _, v in pairs(game.Players:GetPlayers()) do
if (v['PlayerGui']) then
v['PlayerGui'].Intermission.Frame.TextLabel.Text = timer
end
end
wait(1)
end
Report Abuse
ScriptGuilder is not online. ScriptGuilder
Joined: 07 Aug 2014
Total Posts: 848
13 Oct 2014 05:21 PM
Nope.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
13 Oct 2014 05:22 PM
for timer = 10, 0, 1 do
Ahem...
for timer = 10, 0, -1 do
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
13 Oct 2014 05:23 PM
for timer = 10, 0, 1 do

Shouldnt that be -1? Surely timer + 1 repetitively wont get to 0, right?
Report Abuse
TheGuyWithAShortName is not online. TheGuyWithAShortName
Joined: 27 Jan 2012
Total Posts: 4184
13 Oct 2014 06:06 PM
@Sensei Well, if it continues to go up it will eventually go negative and then go up some more until it finally reaches 0.. it would take a while, but it would eventually get there. ;)
Report Abuse
ScriptGuilder is not online. ScriptGuilder
Joined: 07 Aug 2014
Total Posts: 848
13 Oct 2014 06:07 PM
^
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