How to toggle widget visibility on and off?

This is my first time using unreal, I am scrambling to learn it as fast as possible for a game design class so bear with me if my question is stupid or if what I tried to create is really bad, I am doing my best

So my goal here is at the start of the level I want the widget W_Tutorial to appear on the screen, when the player presses F that widget should disappear and be replaced by W_rules. And from that point on whenever the player presses F it should toggle W_rules on and off for the player to reference if needed

as of right now it does not do that. Intead W_tutoral will apper, when the player presses F W_rules comes up but W_tutorial does not go away. and the second time F is pressed both of them go away and then F stops doing anything, please help

With widgets you don’t need to create them every time you want them to be put on the screen. If you store the widget inside a variable you can access it again without having to create a new instance.

This is a quick mock up that does exactly what you want.

This is far from being the best way to do this but it will suffice for quickly mocking up what you are trying to achieve.