so, in theory, what you have to do is instead of just adding speed to y or x you need to get the direction the camera is facing and add speed to that direction.
about the pratical solution, i can’t tell “just add this node here and plug this thing to it and it’s gonna work” because i would need a better look at your code, but there’s a “direction plug” in “Add Movement Input” should be easier if you use it