void Used() { Collider2D[] colliders = Physics2D.OverlapCircleAll(new Vector2(transform.position.x, transform.position.y), 0.3f); foreach (Collider2D c in colliders) { if (c.tag == "hole") { Teleport f = c.GetComponent <Teleport>(); f.GoTo(GetComponent <Collider2D>()); } } }