Hello, How could I make the map reset or regenerate after some time is up or when the game ends so that a new one can begin?
I am tryng to understand the clone() function where it would delete the map and it would generate the cloned one but i cant really understand it.
I need to reset the models as some of them the player can remove by touching them using Remove()
also i found this script which could be helpful:
currentMap = nil
function Regenerate()
if currentMap then currentMap:destroy() end
currentMap = game.ServerStorage.YourMap:clone()
currentMap.Parent = workspace
end
Regenerate()
Thanks for your time!

3 comments
Just to let you know, use :Destroy() since Remove() is deprecated. In that script, you should use :Destroy(), not :destroy() switch to :Clone() and not :clone()
Oh my.. you have no idea how much your comment helped me I couldnt find what was wrong in my previous script but this was the problem! (in the removing models script) Thanks a ton!!!!!
yeah as mudathir said, to remove the copied map use
:Destroy()and to put stuff in server storage just drag it there, like you would anywhere else