When using :Clone() player freeze

Hello!
Today, I have problem

I have use :Clone() and player freeze maybe map is too big or something

How can i fix this?

I have try to make script that will clone little bit, but it still lag

Total Parts: 12940.
Thanks in advance.

Could you post your scripts so we can see what’s going on?

Okay here is it

	local A=game.ServerStorage.Minigames_1:Clone()
	local B = workspace.Minigames_1
	for i,v in pairs(A:GetChildren()) do
		wait()
		v.Parent = B
		for i,m in pairs(v:GetChildren()) do
			wait()
			m.Parent = v
		end
	end

It will lag during loading and lag after its done

Because there are 12,940 parts in total
so it impossible to add more delay.

I’m not really sure why you’re doing what you’re doing. You’re setting the children of a model to be children of a separate model/folder. Why don’t you just set the original model to be parented by the model in question?

The lag should depend on how large the asset is and how triangle efficient it is.

But mine it’s lag like 10 secs before everything normal

After use that script, the lag is decreased but still occur like 4 secs

Sorry for bad english :<

What hes saying is that why don’t you just clone the entire model into workspace instead of cloning every item inside the model and their children. It would just be one operation like this:

local A=game.ServerStorage.Minigames_1:Clone()
local B = workspace.Minigames_1
A.Parent = B 

And make Minigames_1 a model