Can confirm: it doesn’t work with me either.
I made a post in scripting support and people tried to help, but it was no use. It didn’t work no matter how hard I tried.
You’re free to add a reply to any of those threads. It’s not considered a necrobump if you add a response mentioning that the feature is still bugged or have information to provide. This is also much better than posting another thread on an issue that’s already been reported many times.
These are all valid bug reports. ModalEnabled still does not produce intended results if set early, meaning that all of these bug reports are still relevant and valid. Post a reply to these threads rather than creating a duplicate topic for an already-reported issue.
Also having this issue. The difference from past issues is that now it doesn’t work at all. All of my uses of this currently seem to do nothing where they used to before, both in-game and in studio.
ModalEnabled has been “broken” for over 5 years now. As for the current PlayerModule scripts (the ones that implement your camera and your controls), they do not incorporate ModalEnabled at all, making the property completely useless right now.
You will need to use a workaround or fork the PlayerModule so that ModalEnabled works with it. Make sure, when doing this, that you also add an initial state check and set up controls based on the value, then check for changes and toggle as needed. This is so that scripts running earlier than the PlayerModule’s loader (e.g. those in ReplicatedFirst) don’t need to rely on weird hacks to force it off.