I would like to acces a variable called cooldown from another script called BulletScript and i cant figure out what's wrong with my codes.
Here are my codes:
1st:

```
using UnityEngine;

public class gunMechanic : MonoBehaviour
{
    private BulletScript bulletScript;

    private void Awake() {
        bulletScript = GameObject.FindObjectOfType<BulletScript>();
        Debug.Log(bulletScript.cooldown);
    }
}

```

2nd:

```

using UnityEngine;

public class BulletScript : MonoBehaviour
{
  public float cooldown = 1;
}

```