Unity Engine GameObject error? help please

so some days ago I’ve been working on the AI, and it was working pretty well actually, now I was making random enemy spawner in random spawnpoints and I tried, I noticed that there was happenning a really weird problem with an enemy, (the one with less hp, I actually didn’t tested the others, but they share the same script)and saw that the death particles didn’t stop spawning, and the enemy wasn’t getting destroyed(my die() void)

void Die(){
	GameObject particlesClone = (GameObject) Instantiate (particles,transform.position,Quaternion.identity);
	GameObject.Find("ScoreManager").GetComponent<ScoreManager>().score += 1;

I am getting this awkward error:

UnityEngine.GameObject.GetComponent[ScoreManager] () (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/UnityEngineGameObject.cs:27)
EnemyScript.Die () (at Assets/Scripts/AI/EnemyScript.cs:62)
EnemyScript.Update () (at Assets/Scripts/AI/EnemyScript.cs:25)

I have no idea why this is happenning, the only thing that might have cause it was probably moving the project’s root folder because I couldn’t import fonts (and moving the root folder sometimes fixes it, and it did!) so yeah, help me please!
Thanks in advace

This error means different things; Here is one

  1. You destroy the gameObject and the script with it.

  2. After that other scripts tried to access the variable inside of the script which no longer exists

hence the NullReferenceException