attaching armor to bone in proper position !!! help!

var chestarmor : Transform;
var chest : Transform;
function Update () {

if (Input.GetKey (“e”)){
chestarmor.transform.parent = chest.transform;
chestarmor.transform.position = chest.transform.position;
chestarmor.transform.rotation = chest.transform.rotation;

chestarmor.localRotation.x = 3.26;
chestarmor.localRotation.y = -88.95;
chestarmor.localRotation.z = -87.51;
chestarmor.localPosition = Vector3(-1.54,0.031,2.7); // Set local position so that hat sits on top of the head.

this is my equip item script… yet it wont attatch properly and im currently stumped

still need help on this!. just need to figure out how to attatch a gameobject directly centered on another gameobject!

Easiest thing to do is child the new object to the reference, for example, make the hat object a child of the head object and then make the hat object have 0,0,0 position and 0,0,0 rotation. However, this depends on the pivot of the actual object.
Here is a good example 66. Unity3d Tutorial - Character Customization 3d Model Setup - YouTube