Instead of just clipping through the solid object, who would I make the player "die" if they get caught between two solid objects.
Develop games in your browser. Powerful, performant & highly capable.
Lots of ways to do this but for the most basic idea you can just use player on collision with object actions. I'm not sure exactly what you want, do you want the player to disappear? Play a death animation?
If you want the player also not to "clip through" the object which is crushing them, try placing the "crusher" on top (zorder top) to the player - so when it closes down the player is behind it and you can't see.
~Sol