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: Javascript Question

Previous Thread :: Next Thread 
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
29 Aug 2013 06:57 PM
I'm kind of new to Java and coding in general. But I was wondering how you'd get one member of a table at random.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
29 Aug 2013 06:59 PM
Java and javascript are two completely different things.
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
29 Aug 2013 07:00 PM
Ah. Thank you for the correction.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
29 Aug 2013 07:01 PM
What one do you want help with........................
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
29 Aug 2013 07:07 PM
Well I know how to do it in Java ........


import java.util.Random;
int Array[] = {1,2,3,4,5};
int Index = (new Random()).nextInt(Array.length);
int Value = Array[Index];
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
29 Aug 2013 07:17 PM
Javascript doe.

var taybull = [1,2,3];
console.log(taybull[Math.floor(Math.random()*taybull.length)]);
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