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
 

Required to Type ' ' Amount of Numbers/Letters

Previous Thread :: Next Thread 
AndriusKapitanovas is not online. AndriusKapitanovas
Joined: 26 Jan 2013
Total Posts: 474
15 Jul 2014 04:39 PM
How would I do something like generating a random Code or something that would have some amount of Digits? like say 9 Digits of Random Numbers... cos of course I could do it manually like

TotalNumber = {}

Number1 = math.random(0, 9)
etc here

and then do

table.insert(TotalNumber, Number1)

and so on... but I needa do it more efficiently (I want to know, but I dont know about using)
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
15 Jul 2014 04:41 PM
for i=1, 9 do
local num = math.random(1,9)
end

~Tynexx
Report Abuse
AndriusKapitanovas is not online. AndriusKapitanovas
Joined: 26 Jan 2013
Total Posts: 474
03 Aug 2014 05:04 PM
oh yeah lol... thnx, wat about requirements? like 'make a Pas$word with at least 7 Digits' kind of thing
Report Abuse
BlupoV2 is not online. BlupoV2
Joined: 12 Nov 2012
Total Posts: 543
03 Aug 2014 05:06 PM
if string.len([STRING]) == 7 then
-- Code
end
Report Abuse
BlupoV2 is not online. BlupoV2
Joined: 12 Nov 2012
Total Posts: 543
03 Aug 2014 05:06 PM
Or ">= 7".
Report Abuse
AndriusKapitanovas is not online. AndriusKapitanovas
Joined: 26 Jan 2013
Total Posts: 474
03 Aug 2014 05:16 PM
I looked and see... if text:len() >= 7 then
I guess it's correct
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