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
 

How do you make a for loop go backwards?

Previous Thread :: Next Thread 
joeyme is not online. joeyme
Joined: 11 Oct 2009
Total Posts: 530
17 Feb 2012 05:29 PM
Ok, I have a for loop where I get the children of a model, but is there any way I can make it run backwards? Here's the code:

rallys=ship.RallyPoints:GetChildren()
for i=1, #rallys do
stuff is here
end

When it runs like this, it goes from rally 1 to the highest rally, but how can I make it go from the highest to the first?
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
17 Feb 2012 05:33 PM
rallys=ship.RallyPoints:GetChildren()
for i=#rallys,1,-1 do
stuff is here
end

-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]-
Report Abuse
joeyme is not online. joeyme
Joined: 11 Oct 2009
Total Posts: 530
17 Feb 2012 06:33 PM
Hmm... I thought I tried it but I guess I didn't... Thanks for the help.
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