ScreenOrientation.Sensor stays in landscape until character loads (When Players.CharacterAutoLoads = false)

When StarterGui.ScreenOrientation = Enum.ScreenOrientation.Sensor then the game will not rotate until the character loads into the game for the first time. This occurs when Players.CharacterAutoLoads = false and loading is controlled.

This bug occurs every time on production on both a Kindle Fire and an iPhone 5s. I assume it affects all mobile devices.

Reproduction

  1. Create a game with Players.CharacterAutoLoads = false and StarterGui.ScreenOrientation = ScreenOrientation.Sensor
  2. Play game on mobile device with sensor. Try to get it to rotate. It won’t.

Thanks! Let me know if you need any more details on this bug.

4 Likes

See here for some staff responses on this property:

It is probably a good idea to use the module I link there instead of relying on reading this property.

1 Like

Thanks. This is a different, but related bug.

CurrentScreenOrientation != ScreenOrientation ScreenOrientation is being used to specify how I want Roblox to behave, not detecting current orientation.

I’m not actually using CurrentScreenOrientation or trying to detect it. Instead, I’m expecting Roblox to accurately update its own screen orientation to reflect the device’s, which it doesn’t do.

That is, when I tell Roblox “use whatever the user is asking for” it doesn’t until the character is spawned. Before that point, it locks to Landscape. This is a bug outside of my control.

1 Like

@0xBAADF00D

1 Like

Hm, that’s interesting. I thought I had specifically handled this case, but perhaps something broke along the line. Thanks for the info, it should help!

1 Like