Props/Objects Menu

So I’m making a Police Menu and for my third part I’m doing props/objects but it doesn’t work. I don’t know if I made a silly mistake or if I’m missing any coding or ETC. So here is what I got. If you know what’s wrong please help me out.

-- Used in "ThirdItem"
props = {
    "prop_bowling_ball"
   
    }
function ThirdItem(menu)
    local propsList = NativeUI.CreateListItem("~b~Props", props, 1)
    menu:AddItem(propsList)
    menu.OnListSelect = function(source,args)  
        if item == propsList then
            local selectedProp = item:IndexToItem(index)
            local x, y, z = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
    
         RequestModel('prop_bowling_ball')
    
           while not HasModelLoaded('prop_bowling_ball') do
               Citizen.Wait(1)
            end
    
            local cone = CreateObject('prop_bowling_ball', x, y, z, true, true, true)
           PlaceObjectOnGroundProperly(object)
            notify("Spawned "..selectedProp)
        end
    end
end
  local cone = CreateObject('prop_bowling_ball', x, y, z, true, true, true)
  PlaceObjectOnGroundProperly(object)

U create value = cone, but next u call a non defined value object, jst replace this

  local cone = CreateObject('prop_bowling_ball', x, y, z, true, true, true)
  PlaceObjectOnGroundProperly(cone)

I thought, that this must be showing to F8 console, chekout it always, it has a client-side errors and some other things

I tried this and it didn’t work

props = {
    "prop_mp_cone_01"
   
    }
function ThirdItem(menu)
    local propsList = NativeUI.CreateListItem("~b~Props", props, 1)
    menu:AddItem(propsList)
    menu.OnListSelect = function(source,args)  
        if item == propsList then
            local selectedProp = item:IndexToItem(index)
            local x, y, z = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
    
         RequestModel('prop_mp_cone_01')
    
           while not HasModelLoaded('prop_mp_cone_01') do
               Citizen.Wait(1)
            end
    
            local cone = CreateObject('prop_mp_cone_01', x, y, z, true, true, true)
            PlaceObjectOnGroundProperly(cone)
            notify("Spawned "..selectedProp)
        end
    end
end```

checkout F8 console when u call that event, take screenshot of it and post here