Rotation ?

function Update () {

var Player = GameObject.FindWithTag(“Player”).transform;
var targetRotation = Quaternion.LookRotation(transform.position-Player.position,Vector3.up);
transform.rotation = Quaternion.Slerp(transform.rotation,targetRotation,Time.deltaTime*1.0);

}

how can I make the rotation rotate only to z and y axis ?

Something like Player.rotation.x = 0; should do the trick. Place it before your code, but under your local var. Just wondering, are you putting it on the player or something else? I (this last time) put mine on hot air balloons so they would display there banners toward my player.

no to something else it’s a turret

Oh cool, did you get it working?