Detect walls and prevent player from jumping on them
First your problem was that you set the ray sensor range to a kilometers (100000.00), set it to 1 or 2 (1.00), also there is no objects with "walls" propety in your file and the ray should look for ground, i set the higer floating ground to wall and you not able to jump over it, the other i change from ground to floatingGround property so this way the ray's and collisions sensors will not add 2 times the force of jumping when the player is over 2 grounds and add another set of ray and collitions sensors and motion actuator  to jump over the floating grounds.



Before edit

Use a ray sensor property ground combined with the kerboard sensor and collision sensor property wall.


PD. Its late here and this gif take to much lol.