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!!!!

1 comment
I need help on the code, I dont know the code to alternate the Maps, and i also dont know where do put it, Please help!