So I have a bit of an issue with some unity script (Another one, I've given up any interest of using unity outside of my required class projects). So I have a moving object, a ceiling to be specific, and I have it lower and 'crush' the player. However, it's not working. The ceiling moves, but nothing happens when it collides with the player. It used to work if the player was moving when it hit them but it isn't any more and I haven't changed any of the script so I don't know why that's happening. My teacher had a suggestion on how to fix this but he wasn't specific enough on how to actually do it.
His solution was to place a box on the player controller and make that have a reaction when it hits the ceiling. My question is how do I do that, or is that a better way? (Keep in mind I am very bad at deciphering syntax without some sort of example)