Check out some tutorials on sensing doubleclick. Generally it involves NOT acting upon the first click until enough time has passed that you assume there can be no second click coming.
Once you have perfected that (in a nice separate simple script so that it outputs to Debug.Log() either “One click!” or “Doubleclick” and you are sure it works), then connect that user intention to whatever your consider this
Is anything external touching the public Quaternion originalRotationValue? Make it private, find out.
Beyond that, start putting in Debug.Log() calls to find exact numbers of what is being set when.
If that doesn’t cut it, then to help gain more insight into your problem, I recommend liberally sprinkling Debug.Log() statements through your code to display information in realtime.
Doing this should help you answer these types of questions:
is this code even running? which parts are running? how often does it run?
what are the values of the variables involved? Are they initialized?
Knowing this information will help you reason about the behavior you are seeing.
Also obviously this script MUST be on the Transform that you want driven back… is it on the Camera?
If you want this script to live somewhere else, you already have a reference to the Camera… use that to get at its local Transform and observe and set those values instead.