How to have a clock ticking down when my player collides with something

Hi so I only know the basics about scripting but I need to make a clock for my game. I have looked around a bit and nothing really fits my need or im just stupid and dont understand it. So if you could explain this too me like im 5, but once my player collides with something I need to have some text show up and start counting down from 30. While I have a basic idea of what it would look like (something like the code I have at the bottom?) I am not sure how to do the clock component and tune it to my needs.

void OnTriggerEnter (Collider other)
{
if(gameObject.CompareTag("Pickup")
{
//start clock here?
}

Allow me to elaborate a bit more; When my gameobject(the player) collides with an object with the tag Pickup I want the script to do 3 things, Switch Cameras (which I havent gotten to work but this is my code below ↓, maybe someone could help me fix it, What happens is that well nothing happens. The camera1 doesnt enabled and camera2 doesnt disable. Here is a vid displaying it: - YouTube )

using UnityEngine;

public class idk : MonoBehaviour
{
    public Camera camera1;
    public Camera camera2;


    void OnTriggerEnter(Collider other)
    {

        if (gameObject.CompareTag("Pickup"))
        {
            camera1.enabled = true;
            camera2.enabled = false;
        }
    }
}

And then I want the countdown timer to begin starting at 30 seconds. And When it hits 0 I would like the scene to change(I dont really know how to do that. I know the code for switching scenes but im not sure how to implement it here.)

i think it would be something like this. You would need to assign the countDownText Text to UI Text object in your game.

public int countDown = 30;
public Text countDownText;

void OnTriggerEnter(Collider other)
{

  if (gameObject.CompareTag("Pickup")
        {
            countdown -= time.deltatime;
            countDownText.text = " " + countdown;
        }
}

You need to add :

using UnityEngine.UI;

at the beginning of your script, as Text is part of it.

Also, you should change countDown to type float, it’ll never go down otherwise, unless your framerate is so slow that deltaTime is greater than 0.5.

public float countDown = 30.0f;

One more thing, gameObject refers to the GameObject you put that script on.
You may want to change this to:

if (other.gameObject.CompareTag("Player")

So that only the Player triggers the collection of the item.