Does anyone know how to do this?

Everyone who is reading this. I am trying to make a bat that will follow you everywhere but as soon as the bat collides with a block, the bat stops.

collision enebled false turn it back on whenever you want