If you’re dealing with less than ~150 objects this probably isn’t the issue, but otherwise I like to wait one frame every 30 or so iterations. By using the index of a for loop you can use this logic to wait once every 30 instances:
if i%30 == 0 then
wait()
end
Of course you can wait less than this, but waiting once every 100 would probably be a good upper bound.
I looked around and found that apparently its something on roblox’s end, then why did it just start lagging now. They average run about 300ms during the spike which crashes most users. The whole thing lasts 2 seconds for 1 frame.
Does not seem to work I put a wait(2) in between each tycoons creation and it still causes this massive lag spike. When looking into other games their lag spike at the beggining when you load in is about 300ms… why is mine 2000?
Does it mean that not using “wait()” a lot but use like “wait(1)” or “wait(2” please explain more I have trouble from this and my player count dropping