Collision with a moving inclined plane.

I'm creating a game where the character needs to be able to move up and down moving ramps, but I'm having problems with the character passing through these ramps rather than moving up them. I have rigidbodies attached to both and the character has a capsule collider while the ramp has a mesh collider. However, when the character comes in contact with the ramp it will move up it slightly and then simply fall through.

Any help to solve this problem would be greatly appreciated.

Try replacing the mesh collider with a box collider.

How are you moving your character?