Use this "if bgget(layer,spriteX+5,spriteY,1)>0 then spriteX=spriteX-1" and change it accordingly. That line will move your sprite left after making contact wall while moving right. Make sure to put the collision inside the main loop.
nate, its me, Nicky, i got banned from miiverse, are we still developing, i got smilebasic, are you still working on Modern Warfare? please go to : ''Nate And Nicky Chat Room 2'' to answer me. sorry i was gone for 9 days . :(