Basically, you have massive space, and you need to fill it with a bunch of loose 0.001 x 0.001 x 0.001 parts. Is there a way to do this without causing a thermonuclear explosion before I even place 1/6023 of the parts?
Does it need to be simulated? Can you fake it and only fill in the outer sides of the volume the player is capable of seeing so they think it’s filled?
No, the whole area needs to be filled.
I would imagine as long as you are also destroying (using Debris Service) at the same rate you are creating, there shouldnt be much of an issue.
Well my issue isn’t lag while running it, it is lag while creating it. Copying that many parts once crashed studio, so is there any other way to do it?
Plus, I can’t destroy any parts unless they fall out of their respective area, which they shouldn’t, but I can manage that. I have to make sure the whole space is filled.
When you say copying you mean creating instances of them?
No, like, when you’re building in studio but the game isn’t running, just duplicating parts.
I see what you mean, may I ask what you are building that you are using 6k tiny parts to build it? Is this build going to be broken down during the game?
This may not make sense, but…
An atmosphere, is probably the best way to explain it.
Im only asking because with specifics there might be a better way to build this than you are thinking, and we can help.
For example, particle emitters or beams or even just builds that get the same effect but with less parts.
Well, it can really be only built like this, because in reality I’m trying to test three things:
How much Roblox is willing to pay to keep a server running
How to cause a nuclear explosion much my computer can handle
If, when scripted correctly, I can make a fully functioning weather system made atom by atom, that functions fully automatically with no intervention.
Ok, hmmm, well i would script their creation, not build them in studio.
Use a loop that creates instances of the part and drops them into the workspace from a point, but randomly. Go through 6k iterations before ending the loop.
It will probably take awhile to generate all of the parts but could you just add a yield to your script every few hundred parts or so?
Oh wait, I didn’t think anybody would actually figure this out. Ima try that real quick. If I don’t reply in a while, you know what happened.
It sounds like you’re trying to fill a glass, but instead of water or effects, you’re using thousands of water molecules?
Just duplicate bit by bit since it’s for science.
Yeah, pretty much that, except instead of water it’s air, and some water.
From what I understand, spawning in all those parts is what creates the lag. You could have the parts already spawned in, but put the parts like 10 million studs upwards where your computer can’t render them. Then, when you need the parts, instead of cloning them or creating new parts from scratch, you can just teleport the parts back down
There is a module script called PartCache which does the exact same thing, the only video I could find of it in use is this: Make your guns less laggy (and make it Full Auto) - FastCast Gun Ep. 2 - YouTube
(1 minute into the video)