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: math.random()`

Previous Thread :: Next Thread 
ComradeREKTangle is not online. ComradeREKTangle
Joined: 07 Feb 2010
Total Posts: 850
21 May 2016 04:39 PM
how would i clone something into workspace randomly from a table?

local maps = {"map1", "map2"}
local randommap = math.random(1,#maps)
Report Abuse
Erediin is not online. Erediin
Joined: 13 Mar 2016
Total Posts: 756
21 May 2016 04:59 PM
If randomap= map11 then clone it
Report Abuse
textartotoboy2 is not online. textartotoboy2
Joined: 24 Jul 2012
Total Posts: 368
21 May 2016 04:59 PM
its
local maps = {"map1", "map2"}
local randommap = maps[math.random(1,#maps)]
by the way... /\
Report Abuse
DivinePheonix is not online. DivinePheonix
Joined: 30 Mar 2011
Total Posts: 11190
21 May 2016 05:01 PM
local maps = {"map1", "map2"}
local randommap = math.random(1,#maps)

local Map = game.ServerStorage:FindFirstChild(maps[randommap]) or nil
if Map then
Map:Clone().Parent = game.Workspace
end
Report Abuse
ComradeREKTangle is not online. ComradeREKTangle
Joined: 07 Feb 2010
Total Posts: 850
21 May 2016 05:06 PM
thx @divine
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