How could i change bonking height

I am trying to make the player bonk only when the torso touches the ceiling. I am doing this since the torso in my game is the player’s hitbox, and currently the head completely shields it from anything above it (which is obviously not what i want)
does anyone have a solution?

try getting the player’s height and using that via a script or something. I think the Y is the height value.