IK Targets are not working

I want my left hand’s position to fit properly with the gun but none of the IK Targets are working. Here’s my script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Tets : MonoBehaviour
    private class IKTransforms {
        [SerializeField] private Transform leftHandIK;
        [SerializeField] private Transform rightHandIK;
        [SerializeField] private Transform lookAtIK;

        public Transform LeftHandIK { get => leftHandIK; private set => leftHandIK = value; }
        public Transform RightHandIK { get => rightHandIK; private set => rightHandIK = value; }
        public Transform LookAtIK { get => lookAtIK; private set => lookAtIK = value; }
    public Animator animator;
    [SerializeField] private IKTransforms ikTransforms;
    // Update is called once per frame
    void Update()
        if (ikTransforms.LeftHandIK && ikTransforms.RightHandIK && ikTransforms.LookAtIK) {

            if (ikTransforms.LeftHandIK) {
                animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1f);
                animator.SetIKRotationWeight(AvatarIKGoal.LeftHand, 1f);
                animator.SetIKPosition(AvatarIKGoal.LeftHand, ikTransforms.LeftHandIK.position);
                animator.SetIKRotation(AvatarIKGoal.LeftHand, ikTransforms.LeftHandIK.rotation);
            if (ikTransforms.RightHandIK) {
                animator.SetIKPositionWeight(AvatarIKGoal.RightHand, 1f);
                animator.SetIKRotationWeight(AvatarIKGoal.RightHand, 1f);
                animator.SetIKPosition(AvatarIKGoal.RightHand, ikTransforms.RightHandIK.position);
                animator.SetIKRotation(AvatarIKGoal.RightHand, ikTransforms.RightHandIK.rotation);
            if (ikTransforms.LookAtIK) {


and Here’s my animator controller settings:

Call your IK code in OnAnimatorIK() instead of Update(). More info here if you need it: Unity - Manual: Inverse Kinematics