Error with Transform to GameObject

Hello All, I have having a problem with trying to look at

public var selectedTarget : Transform; (TargetEnemy Script)
and using in my Attack script

private var lookTarget : TargetEnemy;

function Start () {

lookTarget = GameObject.Find("Player").GetComponent(TargetEnemy);

     target = lookTarget.selectedTarget;


There is a lot more in the script but this is what is causing the error does anyone know away to reference the transform because it wants selectedTarget to be a GameObject but I can’t change that due to the targeting scripts requires it as a transform.

Any advice or help would be great appreciated.

Error from Unity BCE0022: Cannot convert ‘UnityEngine.Transform’ to ‘UnityEngine.GameObject’.

If I understand correctly, “target” is a GameObject variable? In that case you can’t assign a transform reference to it, you must reference the game object which the transform belongs to.

target = lookTarget.selectedTarget.gameObject;