-My question is how to stop the zombie from waking towards the player if he is in attack state but keep him rotating towards the player because if i set the navemesh agent speed to 0 he will stop rotating too.
I was trying to add a comment, but need more reputation for that. So had to make an "Answer" to reply.
Are you using the same speed var to multiply with the speed of your zombie to also multiply the rotation with?
If so, try adding a seperate var for the rotation speed.