How can i create a green-screen inside the editor so i can take a picture of my gun so i can use it in Photoshop.
Or is there a better way of taking a picture of my gun?

why so complicated? xd, but if you want to do that, just grab a plane from the left panel, and then create a new material bp, drag a vector3, and select a color of your choice, drag a pin on color and put that material on that plane

Easiest way is to create a new level - then drag your mesh in the scene and activate “Render custom Depht”

then make a screenshot in unreal

and look at this:

AND This:

if you then click screenshot, this is what you get (Don’t mind the lighting here please :-)):