I have no idea what "...Assets\Scripts\HealthManager.cs(24.68): error CS1061: 'Tra..." means.

I have no idea what “…Assets\Scripts\HealthManager.cs(24.68): error CS1061: 'Tra…” means, but apparently Unity does so it’s bad news for me.


I’m lost. Any help is greatly appreciated.

Lost? The error states there’s a problem in HealthManager.cs, right? You showed a screenshot of some other classes instead. Did you try looking into HealthManager.cs, at the exact line number is mentions? (line 24). You’re probably doing something like “gameObject.transform.health”, and the Transform class doesn’t have a method or properly named “health”.

Anyway, this is a really basic compiler error which very clearly tells you where the problem is. Go look at the class and line number.

Could it be that I just need to continue the tutorial and it will stop?

Very unlikely. There’s absolutely no reason you’d ever try to access a Transform’s “health”. You probably made a mistake copying some code. You almost certainly need to be accessing the “health” of some other component in the project. Which classes in your project have a "health property?

Nope. Hold on.

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

public class HealthManager : MonoBehaviour
{
public int currentHealth;
public int maxHealth;

public GameObject deathEffect;

// Start is called before the first frame update
void Start()
{
currentHealth = maxHealth;
}

public void HurtPlayer()
{
currentHealth–;

if(currentHealth<=0)
{
Instantiate(deathEffect, transform.position, transform.health);
gameObject.SetActive(false);
}
}

}

There’s my health code. It’s probably something STUPID like a misspelling or something.

This line:

Instantiate(deathEffect, transform.position, transform.health);

At the end, you are trying to access a non-existant member of transform (health)

I think you meant:

Instantiate(deathEffect, transform.position, transform.rotation);

That works! Thank you!