How do i make a Map Changer? I have 5 maps, and i need them to alternate, (New Spawns for Each Map)! I havent tried many codes, i just need help understanding the script! Please Help!! I need to know what is wrong in this script...
local maps = {"map1", "map2", "map3"} local waittime = 60 local function LoadMap(mapName, time) local currentmap = game:GetService("ServerStorage")[mapName]:Clone() currentmap.Parent = game:GetService("Workspace") wait(time) currentmap:Destroy() end while wait() do LoadMap(maps[math.Random(1,#maps)],waittime) wait(waittime) end
I Pasted that script into a script and put in in workspace, I put all my maps in Server Storage, I renamed all my maps, map1, map2, and map3 but i still ended up spawning in the middle of the map HELP!!!!
-Maps 1,2 and 3 have to be in the lighting. -to make different spawn locations make the spawnplates grouped with the maps.
also, could you edit your lua as a lua text? (click the blue lua bubble before you post and put all the code inside the ~