Separate player and enemy movement

Godot Version



When controlling my character using the arrow keys, enemy present in the scene is also moving with it. Why?

Check visuals:

Does the enemy have the template character body 2d script? Are they a child of the player?

I think you moving the enemy by arrows, check the enemy script or the enemy is added inside player

Yeah, both are character body 2d and none is a child of each other. What other physics body can i use for the enemy?

Could you post the script attached to the enemy? I am confident it is taking Inputs specifically the template’s “ui_left” and “ui_right”.