(https://i.sstatic.net/v8KZUz9o.png)
First I removed the empty game object of camera but as it was not working, I tried making it the child of pistol. When I am moving the camera on X axis the gun is moving with it but not happening on y axis.
The gun is rotating on x axis though but not on y axis.
Hopefully I will be helped. 🙂
1