How can I fix this so that it doesnt run up to the NPC? And attacks from a distance instead