How to show/hide HUD

You need to use Event Receive Draw HUD to execute Draw Text. And if you want it to appear only when you fire the weapon, then you can use a blueprint interface with a boolean variable, set it in your character blueprint with fire event and use a branch in the HUD right before draw text.

I want to implement an ammo counter that when the player presses a key, lets say M, the ammo number will appear on the HUD for a certain period of time before dissapearing.
I have attempted it, testing it out with a print, the print works but the actual drawing onto the HUD bit doesnt
any ideas?

Have you tried making this into a function that is called during the update tick for the hud and at the beginning of the draw adding a condition check? Anything that is skipped on the update draw tick will be erased there after. You could be causing a draw flood to happen since as u hold the key down you are issuing a draw command and could be flooding the draw event. That’s one reason why it takes a while to vanish.

There is a simple way to do this

First, when press your “Show Ammo” key, open on a bool

Then remember, if you want to draw any thing on screen, you should use “Event Receive Draw HUD”

Set a branch, if “Show Ammo Number” is true, then draw a text and set a Delay depend on how long you want the text to show.

Until delay complete, close the bool. The text will disappear

Hope helpful

Hello here is a great tutorial on how to do this, credit goes to tesladev