Hello everyone, my project broke when I added a second enemy to my scene. Before adding this enemy, my enemy was moving towards the castle. Now he is just staying in the same position. I can provide any information you need me to. I have spent a few hours trying to fix this issue and am stumped of what I did wrong. I have sense then deleted the second enemy and the first enemy is still not moving
publicTransform target;//set target from inspector instead of looking in Update
publicTransform skeleton;
public float speed =11f;
publicSpriteRenderer spriteRenderer;privateAnimator animator;
voidAwake(){
animator =GetComponent();}
voidUpdate(){ChangeToWalkingStance();
//Moves Enemy Twords Castle
skeleton.position =Vector2.MoveTowards(transform.position, target.position, speed *Time.deltaTime);}