Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to regenerate a map?

I need to know how do the developers make their map regen after several minutes. This question is important (for me) since I plan to make a map which they can destroy the objects in the field. This map I might make will have no fun if it doesn't have a script for it to recover the objects destroyed.

Since I never made my own script before ( I just take and edit a script), and I really want to know how. I hope someone will kindly fulfill me with knowledge I need. Thank you in advance!

1 answer

✓ Accepted answer

This isn't a request forum so it is beyond reasonable expectation for any of us to write the script for you - that said, we'll do what we can to help you on your way.

An important method that you'll want to be familiar with is Clone(), read about it here:

http://wiki.roblox.com/index.php?title=Clone_(Function)

I haven't done this before either, but it really shouldn't be that difficult as long as you're aware of the above function. Make a copy of your map from wherever it is stored (Lighting, ServerStorage, etc...), then whenever you want to 'regenerate' the map just delete the copied version and make a new copy from the storage location.

Something along the lines of:

currentMap = nil
function Regenerate()
	if currentMap then currentMap:destroy() end
	currentMap = game.ServerStorage.YourMap:clone()
	currentMap.Parent = workspace
end
Regenerate()

Hope that helps!

3 comments

0

Well, thanks to you, I now made my own regen script.

1

Awesome! I'm glad I could help.

This discussion is preserved as it was. New answers, comments, and votes are closed.