What I would do, is store the maps in a model named Maps in server storage, and then use this code to access them.
01 | maps = game.ServerStorage.Maps:GetChildren() |
04 | table.foreach(Workspace.currentMap:GetChildren(), function (i,v) v:Remove() end ) |
06 | nmap.Parent = game.Workspace.currentMap |
07 | nmap:MoveTo(Workspace.mapLocation) |
11 | loadMap(maps [ math.random( 1 ,#maps) ] ) |
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?