Ok so I’m trying to add attributes that change the characters statistics. I have the character page where the attributes are displayed, I’m trying to change some text so its says how many points are in the attribute but I keep getting the null reference exception error when I have already called it.
void SetAttributes () {
Attributes attribs = GetComponent<Attributes> ();
if (isVit == true)
GetComponent<TextMesh> ().text = attribs.vitality.ToString ();
vitality is just a public int at the top of a class on another script set to 5.