Hello, my current issue is incredible lag whenever I attempt to parent an object to the workspace. More specifically, an object derived from ReplicatedStorage. It’s strange, because it lags the same amount for any object, doesn’t matter about part count/mesh tris. This is not so much a scripting issue but it is triggered via any command, for example:
for i = 1,5 do
ReplicatedStorage.Assets.Pets.Bear:Clone().Parent = workspace
print("placed object in workspace")
wait(1)
end
There seems to be no client/server boundary, so I am thinking that it merely is the map size (~4000 parts)?
That’s because you are cloning 4000 parts! All on the client! If you’ve ever played the lag test 2020, you would know that 4000 parts takes time to load in(assuming you load one every frame). It took about 2 - 3 minutes, but it gets increasingly slower the more parts you have. I would recommend just parenting it to the workspace, instead of cloning it.
I am 100% sure that it isn’t the script. I’ve isolated every script and cloned seperate objects and the same behavior occurs. I suppose I will start by stripping the map into pieces and find what mesh may be the trouble maker. Thanks for helping!
(EDIT: I had a proxy humanoid in the workspace that was probably listening into the input of the workspace. So dumb of me haha )