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 » Scripters
Home Search
 

Re: Random table member..? Help..?

Previous Thread :: Next Thread 
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
21 Jul 2016 06:23 PM
How would I print only one of this children of this table..?? (I don't usually ever use tables)

Code:

local craptosay = {
'Yolo',
'Test',
'PleaseWork'
}

while wait(5) do
--Code here
print(--[[More code here--]])
end
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
21 Jul 2016 06:24 PM
table[math.random(1, #table)]
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
21 Jul 2016 06:25 PM
You just have to fetch a member from the table with a random index.

print(table[math.random(1, #table)])
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
21 Jul 2016 06:26 PM
I SWEAR KODRAN NINJAS ME EVREY SINGLE TIME
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
21 Jul 2016 06:27 PM
:)~
Report Abuse
SadisticNub is not online. SadisticNub
Joined: 05 Jan 2013
Total Posts: 4948
21 Jul 2016 06:28 PM
crying inside

at least i'm better than you at rollernauts hahahahahahahahaha
Report Abuse
xThe_Developer is not online. xThe_Developer
Joined: 07 Aug 2013
Total Posts: 585
21 Jul 2016 06:28 PM
Table Usage = Cleaner Scripts


#code Signature_mod = require(DataModel['sm_Data']) if Signature_mod['xThe..']['RbxDev_Info'] ~= 'Too Lazy To Try Again After A Year' then print('You finally did it lol') end
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
21 Jul 2016 06:29 PM
but do u have the eyeball ball? didn't think so mate :>
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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