How do you use add force to move a rigidbody to a transform.position?

Im trying to make a gun that when the trigger on the end of it touches a target it will pull it to the front of the gun kind of like a vacuum would. I’m struggling to find a way to use Rigidbody.Addforce to move the rigidbody to a transforms position. Thanks for any help in advance. :slight_smile:
Kind Regards,
ELITEMASTER321

You should apply forces in fixed update. Use ForceMode.VelocityChange or modify velocity directly

    public Rigidbody[] items;
    public float force;
    void FixedUpdate()
    {
        foreach (Rigidbody item in items)
        {
            Vector3 direction = transform.position - item.transform.position;
            item.AddForce(direction.normalized * force, ForceMode.VelocityChange);
        }
    }