Clone Selector

Hi unityAnswer’s Users!

I need help about question of clone.
I have a script that generates a new clone every time you touch an object.
Can I do, with a script, to assign each of these clones a different value of the same variable?

thanks!!

Yes

GameObject clone = Instantiate (...);
clone.GetComponent<MyScript>.myVariable = 4;