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
Interesting suggestion from your teacher. I would put a character controller on your player, which you seem to have already. Then I would add the collision code:
void OnCollisionEnter(Collision c)
{
// die.
}
Then add a box Collider and Rigibody to the roof. I would also add this code above to the roof.