$ 0 0 should be... function OnGUI() { if( GUI.Button(Rect(10, 10, 130, 30), "Dance")) { animation.Play(); } }