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: Random Map Changer Script

Previous Thread :: Next Thread 
pieinyofaceha is not online. pieinyofaceha
Joined: 09 May 2012
Total Posts: 2367
30 Jan 2013 05:28 PM
I have been trying to clone and delete maps to make a working map changer for my in-progress game (randomized), but I am a scripting learner who knows quite a lot about scripting, but there are little things like this that I've learned but still have issues with.

Help would be appricated, thanks for reading.

Also, if I make a reply to this thread that says: "Thanks for your help, I fixed my issue", then don't reply anymore, I've fixed it.



Report Abuse
pieinyofaceha is not online. pieinyofaceha
Joined: 09 May 2012
Total Posts: 2367
30 Jan 2013 05:41 PM
Bump
Report Abuse
crookedcool5 is not online. crookedcool5
Joined: 25 Sep 2010
Total Posts: 273
30 Jan 2013 05:44 PM
How many Maps?
Report Abuse
pieinyofaceha is not online. pieinyofaceha
Joined: 09 May 2012
Total Posts: 2367
30 Jan 2013 05:45 PM
Four.
Report Abuse
crookedcool5 is not online. crookedcool5
Joined: 25 Sep 2010
Total Posts: 273
30 Jan 2013 05:49 PM
SOmething like this O.o
map1 = "Map name"
map2 = "Map name"
map3 = "Map name"
map4 = "Map name"
rand = Math.Random = (1,4)
if rand == 1 then
game.Lighting.map1.
-- i made error, it would go something like that. too lazy XD. Btw insert the maps into Lighting.

Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
30 Jan 2013 06:00 PM
Put all the maps into a model in Lighting called "Maps". Change "pos" to where you want the center of the map to be, and "waitTime" to how long you want the script to wait before changing the map.
Untested, btw :3

local pos = Vector3.new(0, 100, 0) -- 100 studs in the air
local waitTime = 200 -- How long to wait before changing maps (seconds)
local maps = game.Lighting.Maps:GetChildren()
local map = maps[1]:clone()
map1.Parent = game.Workspace

while (wait(waitTime)) do
map:Destroy()
map = maps[math.random(#maps)]:clone()
map.Parent = game.Workspace
map:MoveTo(pos)
end

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
electricNinja32 is not online. electricNinja32
Joined: 08 Oct 2012
Total Posts: 5
30 Jan 2013 06:08 PM
Does this actually work?
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
30 Jan 2013 06:08 PM
Why don't you try them out?

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
pieinyofaceha is not online. pieinyofaceha
Joined: 09 May 2012
Total Posts: 2367
30 Jan 2013 10:15 PM
Just logged on again, I am going to try them out now.
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