Animation with object

Hi, i would like to make an animation with attached object, for example: player pickup a box, walk with it and then put it in the trunk. It would be a delivery job.

I don’t know what commands should i use.

I play animation like this:

local pid = PlayerPedId()

    RequestAnimDict("pickup_object")
    while (not HasAnimDictLoaded("pickup_object")) do Citizen.Wait(0) end
    TaskPlayAnim(pid,"pickup_object","pickup_low",1.0,-1.0, -1, 2, 1, true, true, true)

local pos = GetEntityCoords(GetPlayerPed(-1), true)
RequestAnimDict(“anim@heists@box_carry@”)
while (not HasAnimDictLoaded(“anim@heists@box_carry@”)) do
Citizen.Wait(7)
end
TaskPlayAnim(GetPlayerPed(-1), “anim@heists@box_carry@” ,“idle”, 5.0, -1, -1, 50, 0, false, false, false)
local model = GetHashKey(“prop_car_door_01”)
RequestModel(model)
while not HasModelLoaded(model) do Citizen.Wait(0) end
local object = Citizen.InvokeNative(0x509D5878EB39E842,model, pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(object, GetPlayerPed(-1), GetPedBoneIndex(GetPlayerPed(-1), 60309), 0.025, 0.00, 0.355, -75.0, 470.0, 0.0, true, true, false, true, 1, true)