I've don simular things
have a invisible bullet with a very high speed
set angle toward touch.x & touch.y
have a 10 by 10 sprite and set position to touch.x and touch.y
have the bullet speed 0 if overlapping the 10 by 10 sprite
spawn a circle dot the size you want the line if bullet speed is greater than 0
this will spawn a dot every tick the bullet is moving making it appear as a line