rotate problem pls help

i used this code for rotating stuff

direction = rb2D.velocity - new Vector2(transform.position.x, transform.position.y);
float angle = Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg;
Quaternion rotation = Quaternion.AngleAxis(angle, Vector3.forward);
transform.rotation = Quaternion.Slerp(transform.rotation, rotation, rotateSpeed1);

but I want it to rotate towards the right so I added -.25f to rotatespeed1 but it didn’t rotate pls help

You should read a bit more in the documentation about the Lerp and Slerp functions. just changing the “speed” value is not a good solution here. (Specially since you just substract some value without telling us what the original or resulting value is)

to change the direction of your rotation your should invert the value of angle. So -angle instead of angle.

This ofc assumes that this was your only problem here and your rotation is already around the correct axis and just going to the left instead of right. If this is not the case please add way more information to your question.

Good luck.