Obstacle prefab falls through floor

I’m making a project where the player jumps over obstacles. Lesson 3.1 - Jump Force - Unity Learn
and the obstacle prefab keeps on falling through the floor.
these are the inspector settings for the prefab

and these are the inspector settings for the ground

and this is the code i use for the movement of the prefab

how do i fix this?

can someone please help