RPG shooting

I am trying to make an rpg game but i am having trouble figuring out what the code would be to shoot. because lots of tutorials that i’ve tried have the bullets shoot in one direction and i want the bullet to shoot from where my main character is facing.