How do you set up global locks on one of XYZ's axes

The SideScroller template of the sample template can only move on the YZ axis. How can I change it to move on the XY and lock on the Z? Thank you