is it possible to attach a damage zone to a moving object?

So, I want to make the line follow the player. Imagine that u are the player, and line following you. So this line should be behind you and it should damage enemies who will touch it.