Object pick up script

So im trying to make a game like amnesia, and I want to be able to pick up a lantern (like a flashlight) so it attaches to the first person controller. Im new to Java script and C# so if anybody can help me it would be great.

Put something like this in the script controlling your pick-up object (make sure the collider on it is set to isTrigger)

void OnTriggerEnter(Collider col) {

    if(col.gameObject.tag == "MyTag") {

        // insert code to move position of the object to right in front of the player
    }
}