Chunk Loader LocalTransparency vs. Parenting to Nil

I am working on a chunk loader and I would like to know what is more efficient setting a part’s LocalTransparency to 0 or parenting it to nil. I am aware parenting parts to nil and back to the workspace creates a reasonable amount of lag so I am thinking of using both methods. Such as parenting to nil only when required such as if I am about to load a massive new section of the map into the game.

Setting the transparency of a part to 1 only lets the computer know that they don’t have to draw its surfaces on the 2D camera screen. There are other factors that will still come into play with this part though:

  • Physics will still enact (if anchored is true, then physics I believe becomes dormant? Correct me if I’m wrong, anyone)
  • Collisions will still enact unless CanCollide is set to false

Parenting to nil tells the computer to not only not render its surfaces, but also don’t include it in any processes that involve the “workspace step” (physics, collisions, rendering, etc). This essentially gets rid of a lot of resources for the CPU.

Touching on Parenting, if you do happen to be getting lag when parenting around, that just means you’re doing too much at a time. For example, parenting an entire chunk to workspace will cause a major performance dip if it has like 10,000 parts in it. That just means you need to load bits of the chunk into workspace at a time! Ever played a game that loads a map’s parts individually over like 20 seconds? They do that for the same reason.

In very short terms, use the “parent to nil” method, but remember to load chunks over a period of time (if it has a lot of parts in it) or you will lag like you said.