2d character not moving towards target

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);}

Using Code Tags Properly

Are you getting any errors? What is the value of speed in the inspector? It’s 11 in your code, but the inspector value will override that. Is it 0? Have you set the target field in the inspector?

No erros.

speed is set to 3 in inspector

target field is the castle prefab in the inspector that i would like the enemy to walk to.

Everything was working fine this morning. As soon as i duplicated the enemy he will no longer walk

Add calls to Debug.Log to make sure the code actually being called - log out the various values to make sure they are what you think they are. Is the script actually enabled on the object?

Also, please edit your original question and format your code properly so it’s readable - link with instructions is in my previous post.