Screenshot funcionality in packaged game?

So I tried to create the screenshot functionality using UMG Menu but on clicking the button in the packaged game it crashes the game.
Any idea of how to set up a working screenshot button? Sorry if it’s a silly question but still learning.

Forgot to mention that I also tried the “Execute Console command” node but that didn’t work as well

I’m using this and it works in a packaged built. Ignore the Warning!. It’s because I don’t have the input action set in the project settings.

Screenshot Resolution would be an integer like 2 but I don’t know why it wouldn’t work with any screenshot resolution.

Thanks man but it is complicated for me to understand. Thanks anyway for your answer. I will just remove the screenshot functionality for now feom my demo and add it later when I get it.

the simple UMG button works fine with me , all I did is add a button and assign on clik take high res screenshot ,

maybe try with an empty level and check again

Thanks but it doesn’t work for me. I don’t remember right now if it worked in unreal or not but it certainly didn’t work in packaged game for me.

That’s what I have in my level and it works great inside Unreal editor but once I package the game, the screenshot button crashes the game.
But, as you said, I will give it a last try in an empty level

I am making a shipping build using UE 4.23.1 and no the tilde key doesn’t bring up the console command in it.