If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly
NEVER manipulate rotations via eulerAngles. Here’s why:
https://starmanta.gitbooks.io/unitytipsredux/content/second-question.html
Keep your own rotation and drive it explicitly to the .rotation
or .localRotation
You may wish to consider using a tweening package such as LeanTween or ITween or DOtween to move stuff. It gets you out of a lot of boilerplate hassle-y code.