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: Am i picking the random text correctly?

Previous Thread :: Next Thread 
Ferki is not online. Ferki
Joined: 22 Jan 2013
Total Posts: 968
06 May 2013 08:50 AM
Say = {"Hi!"
, "Hello."
, "Hey!"
}
print(math.random(#Speach))

All i get in the output is:

>>1

>>2

>>3

>>1

>>2

>>3

(Using Commandbar)
Report Abuse
Looah is not online. Looah
Joined: 22 Feb 2013
Total Posts: 922
06 May 2013 08:58 AM
...
ehrm..
:i
try

sp = {"ohai","bai","lolwt"}
print(sp[math.random(#sp)])



public bool cats = !stupid;
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
06 May 2013 08:59 AM
function Pick()
math.randomseed(tick())
print(math.random(1, #Speach))
end

for i = 1,10 do
Pick()
end
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
06 May 2013 08:59 AM
No, it's more like

print(Speach[math.random(1, #Speach)])

can't remember but that may be it
Report Abuse
Ferki is not online. Ferki
Joined: 22 Jan 2013
Total Posts: 968
06 May 2013 09:00 AM
Thanks, It worked! :3
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
06 May 2013 09:01 AM
If you wanna to get the Text :

print(TableName[math.random(1,#TableName)]))
Report Abuse
Looah is not online. Looah
Joined: 22 Feb 2013
Total Posts: 922
06 May 2013 09:02 AM
juriaan
1, is unnessicary

public bool cats = !stupid;
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