how to make one script with different animations attached

Okay so this is my first post. Anyway I made a script:

using UnityEngine;
using System.Collections;

public class MusicOnOff : MonoBehaviour
{
	private bool  Trigger = false;
	public GameObject Button;
	public GameObject Speaker;
    Transform DoorGameObject; 
    private bool  HasTriggerBeenUsed = false;
    void  OnTriggerStay ()
	{
		if (Input.GetKeyDown("f") && !HasTriggerBeenUsed)
		{
			// toggle audio on/off on audiosource of speakers
   			 AudioSource source = Speaker.GetComponent<AudioSource>();
   			 source.enabled  = !source.enabled;
			{
				Trigger = true;
				if (Trigger)
					Button.animation.Play ("Buttondown");
					}
				}
			}
		}

and where it says: Button.animation.Play (“Buttondown”);

I want to be able to edit the animation so it can be changed easily like making it a public GameObject kind of and the script would not have to be edited. If this can’t be done I can always try something else though.

The script also may not be great it is my first script made by myself it was probably one of the simplest things I could make so if it could be left the way it is it would also be appreciated.

I understand your problem.

Maybe you don’t need animations at all. Maybe you can use THIS. It will help you move your button from a position to another smoothly. If not, I’m afraid you’ll have to make different scripts, or at least one script containing the handling of the 13 buttons at once …

Yeah that looks a lot like what I needed thank you so much anyway on my first post. :smiley: