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

Map Regen Script doesn't work effectively?

Hello, Yes I am new to scripting and i want to make a regen map script. The Main problem with this is im not sure how to and with what I have already it doesn't clear the cars in my map so they break.

local ServerStorage = game.ServerStorage local Map = ServerStorage.CMap

while true do wait(10) print("Regenerating Map!") local clone = Map:Clone() clone.Parent = game.Workspace end

This is not a good regen script, so if anyone can help me make a better one or tell me how to make this one better please do!

1 answer

idk why u would be regen erating every 10 seconds but idk lol try this it should work

local storage = game:GetService('ServerStorage')

while wait(10) do
	local newMap = storage:WaitForChild('CMap'):Clone()
	workspace.CMap:Destroy()
	newMap.Parent = workspace
end

if it works plz accept my answer

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