Lets say you are controlling the paddle with the mouse and the furthest the paddle can go to the left without hitting the wall is 40 and the furthest right is 500,,,,,,,,
make a condition and action as follows :
System>everytick..........Paddle >set x to clamp(mousex,40,500)