TaskRappelDownWall

Hello guys,
I have an question to the TaskRappelDownWall Native. Im writing a js script to rappel down from a wall but the native doesnt work for me. In lua I wrote nearly the same and it works fine but I like js on my server more so I want to bring it to work.

My Code :

isRappeling = true;

    let ped = PlayerPedId()
    let playerHeading = GetEntityRotation(ped, 2)
    let rope_start_coords = GetOffsetFromEntityInWorldCoords(ped, 0, -0.5, -1);
    let rope_pin_coords = GetOffsetFromEntityInWorldCoords(ped, 0, 0.5, -1);
    let playerSpawnCoords = GetOffsetFromEntityInWorldCoords(ped, 0, 1, -3);

    let max_rappel = rope_pin_coords[2] - GetEntityHeightAboveGround(ped)
    RopeLoadTextures()
    let ropeId = AddRope(rope_start_coords[0], rope_start_coords[1], rope_start_coords[2], 0, 0, 0, 210.0, 7, 210.0, 210.0, 1.2, false, false, true, 10.0, false, 0)
    
    let rope_heading = playerHeading.slice();
    rope_heading[2] = rope_heading[2] - 180
    SetEntityRotation(ropeId, rope_heading[0], rope_heading[1], rope_heading[2], 2, true)
    RequestClipSet("clipset@anim_heist@hs3f@ig1_rappel@male")
    
    setTimeout(() => {
      SetEntityCoords(ped,playerSpawnCoords[0], playerSpawnCoords[1], playerSpawnCoords[2], 0, 0, 0, false)
      TaskRappelDownWall(ped, playerSpawnCoords[0], playerSpawnCoords[1], playerSpawnCoords[2], playerSpawnCoords[0], playerSpawnCoords[1], playerSpawnCoords[2], max_rappel, ropeId, "clipset@anim_heist@hs3f@ig1_rappel@male", 1)
      N_0xa1ae736541b0fca3(ropeId, true)
      PinRopeVertex(ropeId, GetRopeVertexCount(ropeId) + 1, rope_pin_coords[0], rope_pin_coords[1], rope_pin_coords[2])
      RopeSetUpdateOrder(ropeId, 0)
      if(playerHeading[2] < 180) {
        playerHeading[2] = playerHeading[2] + 180
      }else {
        playerHeading[2] = playerHeading[2] - 180
      }
      SetEntityHeading(ped, playerHeading[2])
      
      rappel_interval = setInterval(() => {
        if (isRappeling) {
          notify("Drücke ~INPUT_PARACHUTE_SMOKE~, um das Abseilen zu beenden")
          if(IsControlJustReleased(0, 154)) {
            clearInterval(rappel_interval)
            rappel_interval = null;
            ClearPedTasks(ped)
            isRappeling = false;
          }
        }
      }, 3)
    },1000)

Maybe some of you will know something to help me out.

can u share your lua code ?