Debug.Log being called twice

Hello.
I am trying to make it so when I’m stood in a trigger and looking at a button, I can press the button. My debug text is being called from my button script however and I can’t understand why.

CameraLook.cs

void Update()
    {
        float mouseX = Input.GetAxis("Mouse X") * mouseSensitivty * Time.deltaTime;
        float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivty * Time.deltaTime;

        if (!playerController.isDead)
        {
            xRotation -= mouseY;
            xRotation = Mathf.Clamp(xRotation, -90f, 90f);

            transform.localRotation = Quaternion.Euler(xRotation, 0f, 0f);
            playerBody.Rotate(Vector3.up * mouseX);

            LookingAtButton();
        }
    }

    // Return true when looking at button
    public bool LookingAtButton()
    {
        if (Physics.Raycast(transform.position, transform.forward, out var hit, 10f))
        {
            var obj = hit.collider.gameObject;

            if (obj.tag == "Button")
            {
                Debug.Log("Looking at button"); // Debug text in question
                return true;
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }
}

This seems to be logging each frame correctly, here is the problematic script that is also calling the debug text -
Level1_Button.cs

void OnTriggerStay(Collider other)
    {
        // Trigger detecting collision with player
        if (other.name == "Player")
        {
            intIcon.SetActive(true);
            cameraLookText.SetActive(true);
            buttonText.SetActive(true);

            if (cameraLook.LookingAtButton() == true && Input.GetKeyDown(KeyCode.E)) // This is line 23
            {
                ButtonPressed();
            }
        }
    }

198948-problematic-script.png
Thank you!

In CameraLook.cs you are calling LookingAtButton() at the end of update on line 14. This causes it to print the log once. You aren’t doing anything with the return value here, so I guess this is just for testing if the message will appear?

Then in Level1_Button.cs, you are calling LookingAtButton() again in your if statement where you check if its true, which causes another debug log.

I would suggest removing the method call from CameraLook.cs.