i had A LOT of trouble learning them last year, but now they are pie. heres some tips
-learn on a flatbar first, not a box especially wide ones.
-as you approach the end of the rail, torque your body and get ready to spin.
-grip the rail to push off the edges of it. assuming you slide right foot forward, to spin off blindside, push off your right toes (your right nose will be dropped). to spin frontside (landing switch), push off your left toes.
-try to swing your shoulders around.
-look where you want to go, your body wont spin if your head remains stationary.