LIVE NOW: Mobile Controls Toggle Fix for ModalEnabled + Upcoming Deprecation

Developers,

We have fixed a known issue with the ModalEnabled property and it will function correctly in the next update.

The fix was turned on today, June 3rd.

Key notes on these changes:

  • Before this fix, the TRUE value did not work - the controls would always be seen as FALSE
  • If you have set this property to TRUE in the past and left it in that state, you will need to check your experience to make sure it will work as expected when the fix goes live
  • If you notice that your mobile controls have disappeared, you will want to check this property
  • If you have forked your PlayerScripts, you will need to merge the latest changes to use this

This property will eventually be deprecated in favor of a more intuitive/user friendly method, but the old property will still work after deprecation. We will send out additional information and update the relevant documentation to reflect the move to the new property when the updated solution goes live.

For those of you who have posted about this previously on the forums, thanks for your patience as we reviewed the best path forward to support this functionality.

172 Likes

Thank you! This has been broken for months…
I still will be happy it’s enabled, but I hope the new system is more reliable.

13 Likes

One question: Will this “more intuitive/user friendly method” break the workaround I’ve been using to get around ModalEnabled not working (destroying the touch input UI in the player’s PlayerGui)?

12 Likes

huh? i dont get what this means.

4 Likes

Ah, finally, thank you! Our game requires the ModalEnabled Toggle and it depends on that very much.

5 Likes

When you turn Modal on in a GUI Property, it makes it so when you’re in first person and if the GUI is visible, you can move your mouse freely whilst it’s still visible.

6 Likes

I’m hoping the new method comes out soon, as ModalEnabled is already hard to work with. Possibly a simple :ModifyModal(args) but instead of it being just mobile commands, it’s everything. (Reset button, leaderboard, emotes, etc)

The current way of disabling all controls is difficult for no reason.

8 Likes

Is it? SetCoreGuiEnabled seems trivial enough.

1 Like

I would really, really like it if Roblox introduced some API that allowed developers to get the actual screen gui object that contains the mobile controls and just set its enabled property to false. We can get them right now just by indexing the player gui. That would also allow devs to set the images of the image buttons that are used on the default buttons.

1 Like

That would be a nightmare, as a game dev I don’t want to keep editing the exact path / properties I need to touch to achieve this as Roblox updates the core UI.

A future-proof abstraction is definitely preferred here.

2 Likes

I see what you’re saying and might actually agree with you in most cases, but for a lot of people who fork the player module (as I have in all of my major games), it would absolutely be easier this way.

Perhaps creating attributes on the UI’s screen gui object would be a good way to meet in the middle. Bloating API with extra services and properties would be annoying and hard to keep track of, but if the commonly changed properties of the touch UI (button size, Image color, certain properties) were condensed down to attributes, then the Roblox modal could reference those and update the touch buttons as they change, while still maintaining the full control and access devs get when they can reference the gui object itself. I feel like implementing things like TouchEnabled as service properties when the controller itself is written in Lua is just more useless api bloat.

2 Likes

This is true, but the post is referring to UserInputService.ModalEnabled which has been broken for quite some time now, but you are referring to GuiButton.Modal.

1 Like

In my opinion, yes. ResetButtonCallback being disabled too early can cause it not to get disabled at all and SetCoreGuiEnabled doesn’t apply to mobile controls. It’d be nicer if it was all under one function with multiple arguments and proper documentation on what they all mean.

3 Likes

The fix for ModalEnabled is live. Enjoy!

11 Likes