How can I have a mobile Hold to shoot system

I want to have a Hold to shoot style button on my mobile game but now when I click outside of the button, it works perfectly and when I want to shoot with the button, it does but I need to hold it before I move the character or it does nothing.