Problem with switching Huds/removing from parent

This is created in my custom player controller. This works for opening the menu, but when i try to press it again to close it, it doesnt close.

this is the remove menus function

is bumping allowed/work?