Shoot an arrow with a function

Im trying to make a function that when run shoots an arrow in the direction you are looking. How would I do this?
Continue to help post