Can I put a delay in this code?

So I wrote a code a while ago but I don’t know how I can put a delay in this code (marked with red

). (I just started programming)

float delay = 3f;
private float counter = 0f;
private bool count = false;
void Update () {
if (Input.GetButtonDown(“Fire1”) || count)
{
if(!count) {
charactersIndex++;
if(charactersIndex == characters.Length){
charactersIndex = 0;
}
}
if(counter < delay)counter += Time.deltaTime;
if(counter >= delay)
{
currentCharracter.GetComponent().enabled = false;
characters[charactersIndex].GetComponent().enabled = false;
GameObject.Find(“Camera”).GetComponent().target = characters[charactersIndex].transform;
count = false;
}
if(!count)currentCharracter = characters[charactersIndex];
count = true;
}
}
Just Replace My Code With Yours And It Works Fine.

Hope It Helps.
[EDIT] Forgot To Add Counter Variable :stuck_out_tongue: