I need a component which move (slide) on a metal rod

I cant because a lineer gear wont let the component attached to it move freely.