Change rotation of child gameobject

I have an empty gameobject ‘NPCs’, in here I have one gameobject ‘carl’ , this is a NPC (position is not fixed throughout entire game).

I have a prefab called ‘ArrowCylinder’ which is a small cylinder with an arrow texture on it.

In my code I want to show the ArrowCylinder prefab on top of carl’s head. Everything is working perfectly except that this gameobject has his rotation on y always set to 135. It needs to be set to 0 on the y.

My code looks like this:

GameObject npcObject = GameObject.Find("carl");
Vector3 npcPosition = npcObject.transform.position;
Vector3 pos = new Vector3(npcPosition.x, npcPosition.y + 3, npcPosition.z);
GameObject arrow = Instantiate(prefabCyl, pos, Quaternion.Euler(0,0,0)) as GameObject;
//arrow.transform.Rotate(0,0,0);
arrow.transform.parent = npcObject.transform;

The rotation of the child object (the arrow) is relative to the parent - so the rotation of the parent is affecting the child. If you instantiate the arrow object with the rotation of the npcObject (you might need to experiment with transform.localRotation (local space) and transform.rotation (global space) depending on whether the NPCObject is parented to another Gameobject) then it should work with euler(0, 0, 0) in the editor and the child object should face the same direction as the npc.

GameObject arrow = Instantiate(prefabCyl, pos, npcObject.transform.rotation) as GameObject;