here is my comment code. itâs usually convoluted because i talk to myself in the code to help me understand it
//we create a variable of type GameObject named smokePuff and give it the value of an instantiated particle effect smoke cloud
//the smoke has itâs transform set to the instance of the brick that is creating it, as well as the rotation.
GameObject smokePuff = Instantiate(smoke, transform.position, Quaternion.identity);
//this is wierd, ok so first we have to create a variable of type ParticleSystem.MainModule and call it main
//then we setâs value to the result of smokePuffâs ParticleSystem.main
ParticleSystem.MainModule main = smokePuff.GetComponent().main;
//then on itâs âmainâ section in the inspector, the startColor, we set that to the same value that the brick is using as itâs color
main.startColor = GetComponent().color;