How to unlock mouse in LockFirstPerson when UI appears?


So I got a door here that I found on a YouTube tutorial where you need to enter a code for it when the UI pops up. In my case though, my game is in first person mode and the mouse doesn’t want to unlock. I was wondering if someone may guide me through how I’ll go by on making the mouse unlock only if the GUI is being shown as I’m not that experienced scripting?

Video on what’s currently happening?


If you have textbuttons/imagesbuttons in the gui, which you do, have at least one of them have their Modal property set to true


LOL that was easier than I thought, I was over here about to make a whole script :joy: God bless!


I did this and when I close the ui I have to hold right click to be able to move the camera, any fix to this?

1 Like