Any help with a system that will load a map from server storage to workspace? Or would that be A clone function?
COMMUNITY QUESTION
Game Map Loader?
2 answers
It would be a :Clone() function doing most of the work. Here is a simple script that would work, if it happens your map is named "MapNameHere" :)
map = game.ServerStorage.MapNameHere:Clone() -- Replace MapNameHere with the name of the map
map.Parent = game.Workspace
Here's how it works:
- First we
Clone()the map from ServerStorage and set it in the variable "map" - Now we set the "map" variable's Parent to Workspace, copying the entire model to the 3D view
All you would need to do after this code is to surround it with other code such as loops and other functions. If you need two different maps, you can use a random number generator with copies of this code.
while true do
--first Map
wait(1)
local MP1 = game.ServerStorage.MP1
MP1:Clone().Parent = game.Workspace --clones the first map into workspace
wait(10)
game.Workspace.MP1:Destroy() --deletes that map
end
Hope it works :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Remove the () on game.Workspace!
Thanks! I can easily get confused between objects and functions!