How do you stop an animation that you have initialized with a GUI Button?

I have an odd problem, I have a overhead map that I setup to view (with animation) whenever I press a gui button. Everything works great however I can’t seem to stop the animation, (revert back to originally camera view) when pressing another gui button. I used animation.stop and it just gives me that error that it “can’t be executed because of its side effects” inside the method. I can’t start another animation either to switch it back. I don’t know how to “stop” the animation so that it reverts back to the original camera view? BASICALLY i just need to turn an animation on, then turn it off, thats its. Please help this has been driving me crazy. Left some code below of my gui button. Animations are attached properly on the same object. I even fiddled around with setting up a model variable to make sure the right animations were being called, and attached animations in multiple areas, but no luck. And I tried Legacy and Mechanism, thats not the problem.

#pragma strict

public var model : GameObject;

function OnGUI() {	
	if (GUI.Button(Rect(655,35,250,100),"HUD View"));
		animation.Play("ChangeCam");
		
	if (GUI.Button(Rect(655,222,250,100),"Regular Mode"));
		animation.Stop;
		}

animation.Stop();

as written in the example at: Unity - Scripting API: Animation.Stop

It was working for ages: Unity - Scripting API: Animation.Stop I doubt it stopped working without a good reason :slight_smile: