Cannot implicitly convert type `UnityEngine.GameObject' to `UnityEngine.Transform'


I checked other questions and I don’t understand why I receive this common error.
Here are the important parts of the code :

public static GameObject particle;
public static GameObject clickedGmObj; 
public static GameObject damagePrefab;
public static GameObject healPrefab;


void Update () {
		GameObject clickedGmObj = null;
	clickedGmObj = GetClickedGameObject();


GameObject GetClickedGameObject()
		Ray ray = UICamera.ScreenPointToRay(Input.mousePosition);
	if(Physics.Raycast(ray,out hit))
	return hit.transform.gameObject;
			return null;


public void TeamCast()
var bounds = hit.collider.bounds;
    var v3 =;
    v3.y -= bounds.extents.y;
    damagePrefab = Instantiate(particle, v3, transform.rotation) as GameObject;   
	damagePrefab.transform.parent = clickedGmObj;

And here there are all the lines / functions dealing with spawning gameobjects, saving them or altering them.
Why it gives me the error for the line :
damagePrefab.transform.parent = clickedGmObj;

What I want to achieve is attach the spawned particles to the detected collider in the game which is a unit, so the particle effect will follow my unit around.



damagePrefab.transform.parent = clickedGmObj.transform;

transform.parent expects a variable of type Transform while clickedGmObj is of type GameObject.