# Widget "remove from parent" function doesn't work

**URL:** <https://forums.unrealengine.com/t/widget-remove-from-parent-function-doesnt-work/446113>\
**Category:** UI\
**Tags:** remove-from-parent, unreal-engine, Widget, Blueprint, question\
**Created:** [March 27, 2019, 2:56pm UTC](https://forums.unrealengine.com/t/widget-remove-from-parent-function-doesnt-work/446113 "2019-03-27T14:56:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![egyonic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@egyonic](https://forums.unrealengine.com/u/egyonic)\
**Post date:** [March 27, 2019, 2:56pm UTC](https://forums.unrealengine.com/t/widget-remove-from-parent-function-doesnt-work/446113/1 "2019-03-27T14:56:10Z")

</div>

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.

 ![272582-2019327-223903.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/b/6cb5283dd45bd7c6fae21e06c0f3f134effab84a.jpeg)

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

---

<div class="post-metadata">

**Author:** ![lkav](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lkav/32/983349_2.png) [@lkav](https://forums.unrealengine.com/u/lkav)\
**Post date:** [March 27, 2019, 3:04pm UTC](https://forums.unrealengine.com/t/widget-remove-from-parent-function-doesnt-work/446113/2 "2019-03-27T15:04:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SupDeity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupDeity](https://forums.unrealengine.com/u/SupDeity)\
**Post date:** [March 27, 2019, 3:27pm UTC](https://forums.unrealengine.com/t/widget-remove-from-parent-function-doesnt-work/446113/3 "2019-03-27T15:27:20Z")

</div>

show the code for more accurate answers

---

<div class="post-metadata">

**Author:** ![egyonic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@egyonic](https://forums.unrealengine.com/u/egyonic)\
**Post date:** [March 28, 2019, 2:04am UTC](https://forums.unrealengine.com/t/widget-remove-from-parent-function-doesnt-work/446113/4 "2019-03-28T02:04:54Z")

</div>

![272590-2019328-94851.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/9/649b1f966d69b07acba5adf47fa0fbea22a3c549.jpeg)

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?

 ![272613-2019328-100154.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/4/00470e900f4cfb59c30401a648ad76c18ebb1b7b.jpeg)
