Performance transparency?

Hi! Just a general query -
I’m looking at a way for changing the transparency of multiple parts simultaneously. (Easy way to visualise is like The TARDIS from BBCs Doctor Who) However there’s always the issue of lag due to many parts changing their transparency simultaneously.

My question being what would be the best way of doing it? Would it be iterating through a table of :GetDescendants() or would it be worth giving each Part a :GetPropertyChangedSignal() relating to the PrimaryPart and change based on that transparency?

Some ideas that come to mind are:

  1. Cache the list of parts whose transparency you plan to change - That way you don’t have to spend computation time searching for them in the instance tree.
  2. Call task.wait() every N parts that you change the transparency of - That way you can reduce lag in exchange for tiny engine delays. For example if you want to change the transparency of 10k parts, and N is 100, you will call task.wait() 100 times, so the total delay will be 1/60 * 100 = 1.666... seconds. By increasing N you increase lag and by decreasing N you increase total delay. Therefore you need to figure out the “sweat spot” depending on what you’re doing.