Assuming the direction the player is facing is also the “forward” direction of the actor (it usually is), you can get the forward vector of the player’s actor (search “get forward vector” in blueprint) and then multiply that by whatever speed you want the bullet to go to get a velocity vector.
If you want the bullet to just go in the same direction with the same speed, I think this is the right way to do it. Your bullet will need to be an actor with some type of movement component (I think there’s a projectile movement component, but I haven’t really looked into it). Realistically, any movement component will do.
Movement components have a velocity that you can set (search “set velocity”). Set that to the velocity we calculated in the previous step and you should be good! You’ll want to make sure you’ve disabled gravity and any type of resistances in the movement component of your actor.
1.- Create a blueprint with a projectile component, let’s call it ProjectileBP.
2.- Create an enum and set it with Left, and Right, let’s call it Direction.
3.- Create Inside ProjectileBP a Direction variable (that’s going to be an enum, with Left and Right options to choose), and set this variable as Public, and Expose on spawn.
4.- In ProjectileBP construction’s script put a switch with Direction variable, and set Velocity’s vector variable from projectile component: X=1.0,Y=0.0,Z=0.0 if Right, X=-1.0,Y=0.0,Z=0.0 if left.
5.- Finally in your character Blueprint (the one that fires the projectile) when you spawn the bullet, you will be able to select the direction you want it to go :).
When you “expose on spawn” a variable, you have access to it before you create the actor on the world, so you are telling the projectile to set its velocity when you spawn it.
With the steps I gave you, you should get something like this when you try to spawn your projectile (ignore the player position):
So you create a Direction variable now Inside your character, that updates when you flip your character, or move to the other side, etc. Mine in this example is called ActualDirection and changes everytime I move to one side, or another.