Why am I getting an error when trying to use the SetParent method in the code below?

I keep getting the following error when trying to use the SetParent method in the code below:

using UnityEngine;
using System.Collections;

public class NetworkedPlayer : Photon.MonoBehaviour
{
public GameObject avatar;

public Transform playerGlobal;
public Transform playerLocal;

void Start ()
{
    Debug.Log("i'm instantiated");

    if (photonView.isMine)
    {
        Debug.Log("player is mine");

        playerGlobal = GameObject.Find("OVRPlayerController").transform;
        playerLocal = playerGlobal.Find("OVRCameraRig/TrackingSpace/CenterEyeAnchor");

        this.transform.SetParent(playerLocal);
        this.transform.localPosition = Vector3.zero;

        // avatar.SetActive(false);
    }
}

playerLocal is a transform but a parent needs to be a GameObject (I think)

You never said what the actual error is, or what line it’s happening on. My guess is that you’re getting Cannot implicitly convert type UnityEngine.GameObject’ to UnityEngine.Transform'. You’re using Find() which returns a GameObject and trying to store it to the Transform variable ‘playerLocal’, but you forgot the ‘.transform’ like you did on the previous line.