Widget "remove from parent" function doesn't work

Hi, are you opening a different level? Maybe it works but on begin play you create the widget again.

To make sure if it works reorder it, do first the print string and then remove from parent after that a delay 0.5 just for debugging and then the open level.

show the code for more accurate answers

I follow the guide [Widget guide][1]
MainMenu is a Widget Blueprint, the script is in this Blueprint’s event graph.
I want to remove this Widget from player’s screen when “Play Game” button is clicked. The print function works(“remove” in left-top), but the “remove from parent” doesn’t work.The main menu widget is still there.

I don’t know why.
The first image is the script, and the second is the result when I click the Play Game button.alt text

The first image is the level blueprint. The FirstPersonGameMode is the default level.When game plays, this level is opened and create that menu. So when I click the Play Game button, the level blueprint creates the MainMenu again.

My solution is third image. I just don’t use the Open Level function.
Is there a better solution?