So I created a zombie with an EnemyController Script and after I finished everything, I duplicated it but the problem is that on the duplicate, the void Start() doesn’t work.
void Start()
{
player = characterList.GetComponent<keepCharacter>().activeCharacter.transform;
hp.SetMaxHealth(60);
}
The first one can find the character’s position and has his health bar full, but the duplicate does not. Please help.
Edit:
I know that the function Update is being called because if I manually reference my player position(the reference should happen in Start function) the enemy starts moving (this happens in Update)