Cloning Stuff lags?

Greetings,

when I clone something from serverstorage into workspace, in my case armor or a morph, it creates a 10-20 second lasting server lag. How can I fix that?

Its about loading the instances slower, you know a “loading bar”, not just clone 1000 instances and place them in workspace instantly. That will cause the lag.

When I clone a map(or something big) from ServerStorage and it have thousand of instances, I do it by “sections/split stuff” based on the size of the sections/folders/meshes etc.
If you have a folder which contains many descendants #Folder:GetDescendants(), use a recursive function that will split the amount of instances that can be placed (Part.Parent) per loading loop, or parent them doing a RunService step:Wait() per instance you are parenting in workspace.

Makes the “load” slower, but it gets seamless about lag when parenting lot of instances to workspace.

Well yea I get that, but I really need it at once, would it be possible to do it from replicated storage instead?

Well, “at once” is relative, when I loaded maps of around +50k instances, this took a few seconds and without lag using the approach I did mention.

How many instances are in your armor or model that is causing lag when parented to workspace? Probably players wouldnt notice that is not “at once”

80 Meshparts get loaded when i insert the armor…

Well, when talking about meshes is what I mean in my first post, depends on how many polys those have the way you want them to load.
You created those meshes or you know if those have a big impact?

My modeler created them, all of them together are about 22.000 polys

Took me some time to tweek values to get a fast and seamless loading, if theres only less than a hundred of meshes, you could firstly looping that mesh folder, and cloning-parenting each one with a wait. A RunService step wait on server would be good to try.

If you feel the loading is slow, try to play with different ways to load it