Adding weapon sway? (FPS)

How would I go about having a first person weapon sway when you move? If you look to the left, the gun moves to the right side of the screen, if you look up it moves to the bottom of the screen. This video shows it off well.
Rust Weapon Sway

Anyone have any ideas?

Hi shirk, there (as always) are multiple ways to approach that problem. You can separately animate weapon away in something like maya or blender or whatever you might use and have it play when moving in that direction. You could also add an oscillating motion that loops via blueprints and just have that play when you’re moving. You could increase intensity if you are sprinting as well. For the most aesthetically pleasing, I’d animate it, but if you just want it to function and nothing more then that, just add the component transforms and make it wobble. There’s a tutorial I’ve seen on YouTube about adding rotation to an orb but I can’t seem to find it. If you can just apply that knowledge to your weapon component.

for everything shown in the rust video you can just simply parent your gun to a spring arm and add lagg in the details, this makes the gun follow your camera but slightly behind depending on your values