animation.Play not affect specific bone

Hello guys, I have a character imported from blender that has many animations, but I have to move his head directly by code, well, it works, but when i have to play any animation, his head starts moving like in the animation, there’s a way to stop the head being animated with animatin.Play?

Are you using Mecanim? If I understand your problem correctly, you might be able to apply a body mask to your character to filter out anything that would animate the head bones.