So I need a slime to chase the player but the slime needs to squish before it goes forward so that means an animation but the problem is that it teleports instead of moving. When I use the exact same code outside of the function it works fine.
public float speed;
private Transform target;
public GameObject otherObject;
public void Move()
{
transform.position = Vector2.MoveTowards(transform.position, target.position, speed /** Time.deltaTime*/);
}
// Start is called before the first frame update
void Start()
{
target = GameObject.FindGameObjectWithTag("Player").GetComponent<Transform>();
}
,