How to check if a bullet is shot close to a player's head?

Typically, for a bullet flying past someone’s head, you wouldn’t use Touched because this relies on the bullet not actually hitting anything, rather if a bullet is close to a player’s head. As well: you can’t weld a part to the bullet ray.