Crash when creating vehicle with ped

Vector3 pos2 = CitizenFX.Core.Native.Function.Call<Vector3>(CitizenFX.Core.Native.Hash.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS, LocalPlayer.Character, 0, -5.0, 0);
Vehicle veh = await World.CreateVehicle(CitizenFX.Core.VehicleHash.Police2, pos2);

The whole game was crashed when I used the above client side code to spawn a cop car with ped as passenger.


I know it’s a old thread but same problem here. Have you resolved this issue?
Or does anyone have a solution to create a vehicle with ped without crashing?