How to stop moving platform while widget is on screen

Thanks, yeah I tried that but sadly I have other functions inside my widget that stop working when the game is set to pause. So I thought it was easier to stop the platform as that is really the only aspect that needs to pause during the widget interaction.