iPad mini4 is not compatible with Apple Pencil - as it lacks the required screen hardware that is needed to interact with an Apple Pencil.
Here is the full compatibility list for Apple Pencil and iPad:
Apple Pencil (2nd generation)
You can use Apple Pencil (2nd generation) with these iPad models:
- iPad Pro 12.9-inch (3rd generation) and later
- iPad Pro 11-inch (1st generation) and later
Apple Pencil (1st generation)
You can use Apple Pencil (1st generation) with these iPad models:
- iPad Pro 12.9-inch (1st or 2nd generation)
- iPad Pro 10.5-inch
- iPad Pro 9.7-inch
- iPad Air (3rd generation)
- iPad (7th generation)
- iPad (6th generation)
- iPad mini (5th generation)
Not sure which iPad you have? Identify your iPad model.
Whilst your iPad mini4 is not compatible with Apple Pencil, you may be able to use a third-party Bluetooth Stylus - such as the Adonit Pixel. You need to be aware, however, that these devices do not replicate system-wide support for iOS/iPadOS, but instead require explicit App support.
I hope the information and clarification is helpful to you.