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
 

Spawn RANDOM map from lighting

Previous Thread :: Next Thread 
Cykon is not online. Cykon
Joined: 05 Jan 2014
Total Posts: 272
18 Jun 2014 12:43 AM
How would i do that? I want it to spawn a random map after every round instead of a selected order. what would i type?
Report Abuse
Cykon is not online. Cykon
Joined: 05 Jan 2014
Total Posts: 272
18 Jun 2014 12:50 AM
help please

i have 4 maps named Map1 Map2 Map3 Map4
Report Abuse
Harobrite is not online. Harobrite
Joined: 26 Apr 2013
Total Posts: 1
18 Jun 2014 12:53 AM
ANYONE! WHY IS THERE NO ANSWER!
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
18 Jun 2014 12:53 AM
Get a table of the maps and then have it choose a random one based off the number of maps. You can do this by making something similar to this

Maps = game.Lighting.Maps:GetChildren() --Make a table(list) of the maps
Nmaps = #Maps --Number of maps
Rmap = Maps[math.random(1,Nmaps)] --Random number from 1 to the number of maps
Rmap.Parent = game.Workspace
Rmap:MoveTo(Pos) --Pos is obviously a Vector3 of where you want the map to be.
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
18 Jun 2014 12:55 AM
Correction. This line

Rmap = Maps[math.random(1,Nmaps)]

Should be

Rmap = Maps[math.random(1,Nmaps)]:clone()
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