Why doesn't my score add up

Hi all,

Having some issues with my score not going up. When a bool is true from another script, the score should go up by 1. I’ve included my score script (ScoreUp) that’s attached to the UI text and the script containing the bool(LeftScored). In the ScoreUp script, can confirm the bool LeftHitter is becoming true but my score still doesn’t add. I’ve still got lots to learn but any help is appreciated!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;

public class ScoreUp : MonoBehaviour
{
    public TextMeshProUGUI scoreText;
    public int score;
    public int highScore;


    // Start is called before the first frame update
    void Start()
    {
        score = 0;
        UpdateScore(0);
    }

    // Update is called once per frame


    void ScoreCount()
    {
        if(GameObject.Find("Left").GetComponent<LeftScored>().LeftHitter == true)
                {           
            UpdateScore(1);
   
        }
    }

    public void UpdateScore(int scoreToAdd)
    {
        score += scoreToAdd;
        scoreText.text = "Score: " + score;
    }
}


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

public class LeftScored : MonoBehaviour
{
    public bool LeftHitter;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (GameObject.Find("LeftPlayer").GetComponent<LeftTouch>().TouchLeft == true)
           
        {
                if (GameObject.Find("Left").GetComponent<LeftTap>().LeftHitted == true)
                 {
                LeftHitter = true;
               
            
            }

        }
        if(GameObject.Find("Left").GetComponent<LeftTap>().LeftHitted == true)
        {
            if (GameObject.Find("LeftPlayer").GetComponent<LeftTouch>().TouchLeft == false)
            {
                LeftHitter = false;
               

            }

        }
    }
}

Hi, Trutent. First I want to mention that Unity only runs it’s default functions. Like Start,Update,OnMouseOver etc. In line 24 you defined a function but haven’t used it in Start or Update anywhere.You should add this to ScoreUp function:

void Update()
{
ScoreCount();
}

If you have any other questions or a part oyu are confused in my answer please feel free to ask. Hope this helps.