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
 

2 Table Values In The Same Position?

Previous Thread :: Next Thread 
Orelegus is not online. Orelegus
Joined: 29 May 2008
Total Posts: 856
21 Oct 2014 05:59 PM
How do you determine if 2 different Tables have values in the same position? Example:

Arr1 = {1,2,3,4,5}
Arr2 = {2,4,7,8,9}

If I pick 9 from Arr2. How would I make it pick 5 in Arr 1. Same thing for 7. If I picked 7, how would I make it pick 3?
Report Abuse
ToxicDominator is not online. ToxicDominator
Joined: 24 Oct 2013
Total Posts: 8373
21 Oct 2014 06:00 PM
if Arr1[3] == Arr2[3] then -- that means that if the 3rd number in Arr1 is equal to the 3rd number in Arr2, it'll do something
Report Abuse
Orelegus is not online. Orelegus
Joined: 29 May 2008
Total Posts: 856
21 Oct 2014 06:02 PM
I can't believe I forgot that.. I havn't worked with tables in a while. Thanks.
Report Abuse
Orelegus is not online. Orelegus
Joined: 29 May 2008
Total Posts: 856
21 Oct 2014 06:03 PM
Wait, but I'm using a (for i) loop.
Report Abuse
Orelegus is not online. Orelegus
Joined: 29 May 2008
Total Posts: 856
21 Oct 2014 06:04 PM
Nvm, it would be Arr1[i] == Arr2[i]
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