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

Can I make this regenerate faster using different methods?

Hey I have seen other games have a faster map regeneration than me with much bigger maps, One of them being "Battlefield" which only takes around 4 seconds!

I'm wondering if there's a faster method of regenerating the map using a different method.

Here's all the regenerating map script.

map = game.Workspace.Map 
mapclone = map:Clone()
done = false

function regenmap()
	message = Instance.new("Message",game.Workspace)
	message.Text = "Regenerating the map. . . "
	mapclone.Parent = map.Parent
	map:Destroy()
	map = mapclone
	mapclone = map:Clone()
	message:Destroy()
	message:Destroy()
	message:Destroy()
end

function finish()
	if #alive == 1 then
		message = Instance.new("Message",game.Workspace)
		message.Text = "The winner was "..alive[1].Name
		alive[1].leaderstats.Wins.Value = alive[1].leaderstats.Wins.Value+1
		data:SetAsync(alive[1].userId.."_data",alive[1].leaderstats.Wins.Value)
		alive[1].Character:MoveTo(game.Workspace.SpawnLocation.Position)
		table.remove(alive,1)
		wait(2)
		message:Destroy()
		wait()
		message:Destroy()
	end
	regenmap()
	done = true

Thanks!

1 answer

Remove the unnecessary message:Destroy() maybe?

1 comment

0

That will apporiximently make it 0.33 seconds faster :P I need a way use a different method like perhaps having it in Lighting and cloning it over or something? I think that's what others are doing

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