How can I make it so that when I move it around, it will only move on it's local Y axis?
You would use constraints. There are all kinds of constraints, tracking constraints, IQ constraints, spline constraints, camera constraints. I think you're looking for Limit Location, though. Check here: