C# Increase Score when Destroyed will destroy but won't add score to text

I have a script that I am trying to get to increase my score by one, every time I find a certain object. My problem is that the object will deactivate, but it won’t add a point. I already tried using Destroy method, but I would rather is SetActive.

here is my script -
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System;

public class Pickup1 : MonoBehaviour
{

public Text MyText;
private int score;

// Use this for initialization
void Start()
{

    MyText.text = "Score : ";

}

// Update is called once per frame
void Update()
{

    MyText.text = "Score : " + score;

}

void OnTriggerEnter(Collider other)
{

    score+= 1;

    gameObject.SetActive(false);

}

}

Hi @KingSloth

You should watch this basics tutorial, it explains pretty much everything: Collecting, Scoring and Building the Game - Unity Learn

You could place your score somewhere in your player instead of pickup. Pickup gets picked up it is not a score counter. Player instead should get and know about his score. Why would each and every pickup have a score? Also, the logic is now such that each time you collide with pickup, that specific pickup’s points go up by one, then on next pickup, exactly the same. So Instead you could do:

void OnTriggerEnter(Collider other)
{
	if (other.gameObject.tag == "Player")
	{
		var playerData = other.GetComponent<MyPlayer>();
		playerData.score += 1;

		gameObject.SetActive(false);
	}
}

MyPlayer is just some class you would have on your player which collides with pickup, it should have the score field.