using slerp

having trouble getting this right can someone explain this better

im tring to use this code to get a gameobject to face another that is moving the code below is what im tring. i don’t want smooth follow as smoothing i dont think can be seen. the trouble im having is the first part of the slerp, the transform.position, i tried transform.rotation also.

transform.rotation = Quaternion.Slerp(transform.position, target.position);

To if you want a game object to face another one, no smoothing, you can just do transform.LookAt(target);

You would Slerp to smooth it:

  transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(target.position-transform.position), t);

Where t is a number between 0 and 1 that you normally use a time calculate to update. t=1, it’s at the target rotation, t=0 it’s the start rotation.