how to create a script that does multiple functions?

I want to create a script that disables multiple objects when button is pressed.
this is a pseudo code of the things i want in the code:

when button pressed
play animation
wait 11 seconds (thats how long the animation is)
disable gameobject
disable gameobject
disable gameobject
enable gameobject
switch camera

i can enable and disable objects via script but its just the first 3 and switching cameras im stuck on.

You’ll need a timer and a condition in the Update function. I’ll give you a basic example you can work with. Here I assume you’re using a single Animation component with multiple clips. An AnimatorController is a better solution, but that’s a different discussion

Example:

using UnityEngine;
using System.Timers;
using System.Collections.Generic;

public class Blah : MonoBehaviour
{
    public string animationToUse;
    public float animationLengthInSeconds;

    public List<GameObject> objectsToAnimate;
    public List<GameObject> objectsToDisable;
    public List<GameObject> objectsToEnable;
    public List<Camera> cameras;

    private int currentCameraIndex = 0;

    void Update()
    {

        if (Input.GetButtonDown("space"))
        {
            foreach (GameObject obj in objectsToAnimate)
            {
                Animation animation = obj.GetComponent<Animation>();

                animation.Play(animationToUse);
            }

            Timer t = new Timer();

            t.Elapsed += new ElapsedEventHandler(OnTimeout);
            t.Interval = (animationLengthInSeconds * 1000); //The Timer.Interval field takes milliseconds, so convert.

            t.Start(); //After the interval, it will call the OnTimeout function.
        }
    }

    void OnTimeout(object sender, ElapsedEventArgs args)
    {
        foreach (GameObject obj in objectsToDisable)
        {
            obj.SetActive(false);
        }

        foreach (GameObject obj in objectsToEnable)
        {
            obj.SetActive(true);
        }

        currentCameraIndex++;
        if (currentCameraIndex > cameras.Count)
        {
            currentCameraIndex = 0;
        }

        foreach (Camera cam in cameras)
        {
            if (cameras.IndexOf(cam) == currentCameraIndex)
            {
                cam.enabled = true;
            }
            else
            {
                cam.enabled = false;
            }
        }
    }
}

The public variables at the top can be set using the editor. This example almost definitely won’t fit your needs exactly, but this is the basics of how it’s done, and you should be able to refer to docs or ask more specific questions to figure out the rest from here. Hopefully it’ll be of some help!