I am trying to get a Gameobject from another script and assign it to a gameobject in the current script.
Here is the code I have so far:
piece1 = hit.transform.gameObject; //This sets my raycast object as piece1.
piece1.GetComponent<ParticleHolder>();//This gets the script that has the object I want in it.
piece = piece1.particle;//Particle is the name of the object I want to assign to piece.