Movements of molecular motors on cytoskeletal filaments are described by directed walks on a line. Detachment from this line is allowed to occur with a small probability. Motion in the surrounding fluid is described by symmetric random walks. Effects of detachment and reattachment are calculated by an analytical solution of the master equation in two and three dimensions. Results are obtained for the fraction of bound motors, their average velocity, displacement, and dispersion. The analytical results are in good agreement with results from Monte Carlo simulations and confirm the behavior predicted by scaling arguments. The diffusion coefficient parallel to the filament becomes anomalously large since detachment and subsequent reattachment, in the presence of directed motion of the bound motors, leads to a broadening of the density distribution. The occurrence of protofilaments on a microtubule is modeled by internal states of the binding sites. After a transient time, all protofilaments become equally populated.