Won't register other script.

I have been trying to change a variable from a script for an RPG game I’m trying to make although it won’t seem to register the other script. I’m having an AI cause the player to take damage. I have been trying this over and over again but it won’t register it. I’m certain I have the script correct because I tried typing in the name of the AI script (which the code below is in) and it registered it.

using UnityEngine.UI;
public class AIController : MonoBehaviour

	public Transform Player;
	public GameObject PlayerVariable;
	int MoveSpeed = 4;

	void Start()

	void Update()
		transform.position += transform.forward * MoveSpeed * Time.deltaTime;
	void OnTriggerEnter(Collider col)
		if (col.tag == "Player")
			PlayerVariable.GetComponent<PlayerStats> ().Attack = true;
			PlayerVariable.GetComponent<PlayerStats> ().Damage = 2;
			PlayerVariable.GetComponent<PlayerStats> ().DamageSpeed = 2;

This is the Error it says. The line it’s on is where it changes the variable.

The type or namespace name `PlayerStats’ could not be found. Are you missing an assembly reference?

Some things to check:

  1. Is there a script in your project called PlayerStats?
  2. Is the class it contains also called PlayerStats?
  3. If the above are both true, is the PlayerStats class in a different (or any) namespace?
  4. Are there other compiler errors that are preventing PlayerStats from compiling? If PlayerStats encounters an error before AIController, it might not register with the compiler as existing.

Nice. Thanks again.