How can i find a thirdpersoncontroller hand and attach object to the hand ?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.Characters.ThirdPerson;

public class Flashlight : MonoBehaviour {

    public GameObject playerToAttach;

	// Use this for initialization
	void Start ()
    {
        var someBone = playerToAttach.transform.Find("LeftShoulder/Arm/Hand");
        transform.parent = someBone;
        transform.localPosition = someBone.position;
        transform.localRotation = someBone.localRotation;
        transform.localScale = someBone.localScale;
    }
	
	// Update is called once per frame
	void Update () {
		
	}
}

I attach the script to a cube. I want to attach the cube to the ThirdPersonController hand. So i dragged the ThirdPersonController to the inspector to the script in the cube.

But the variable someBone is null all the time. playerToAttach is not null.
I guess doing: Find(“LeftShoulder/Arm/Hand”); is wrong way.

Also the rest of the code is wrong i guess:

transform.localPosition = someBone.position;
transform.localRotation = someBone.localRotation;
transform.localScale = someBone.localScale;

What i want to do is to attach an object to the thirdpersoncontroller hand. Like he is holding the object.

Best to try this maybe

 public class Flashlight : MonoBehaviour {
 
     public GameObject playerToAttach;
      [SerielizeField]
     Transform someBone;
 
     // Use this for initialization
     void Start ()
     {
  
         transform.parent = someBone;
         
     }
     
     // Update is called once per frame
     void Update () {


         transform.localRotation = someBone.localRotation;
         transform.localScale = someBone.localScale;
         
     }
 }

Then just Drag the “someBone” object in the inspector.
Also moved the localRotation and scale to “update” as it wont update every frame.
No need to set the transform.position because its been set to its parent so it will follow that object anyway.