I have a project and I want it to change maps, I already have more than 5. I know how when you put it in Lighting I got that part, Put the scripting I need help with. Not that I'm saying I want you to script it I just need help
What I would do, is store the maps in a model named Maps in server storage, and then use this code to access them.
maps = game.ServerStorage.Maps:GetChildren() function loadMap(map) table.foreach(Workspace.currentMap:GetChildren(), function(i,v) v:Remove() end)--remove children nmap = map:Clone() nmap.Parent = game.Workspace.currentMap nmap:MoveTo(Workspace.mapLocation) end function randMap() loadMap(maps[math.random(1,#maps)]) end
These are the objects you would need for this code to work.
A model in Workspace called currentMap A model in ServerStorage called Maps
I hope this helps.
Marked as Duplicate by User#2
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?