Page 1 of 1

Close current player.gui.center windows on escape.

Posted: Mon Oct 21, 2019 8:30 pm
by DRE
When player presses escape - current central window is automatically closed, next escape press - pause menu.
I wish it could be a thing for custom frames.

It can be property like 'close_on_menu_toggle' on LuaGuiElement for type = 'frame'. :roll:

Re: Close current player.gui.center windows on escape.

Posted: Tue Oct 22, 2019 6:42 am
by Klonan
You can do this by using player.opened, and listening for the on_gui_closed event

Re: Close current player.gui.center windows on escape.

Posted: Tue Oct 22, 2019 7:08 pm
by DRE
Thanks! :D I should have posted this in another section.