How would I make it so mobile screens don't flip?

How would I make it so that you can’t turn you screen on mobile?

OIP

I don’t want the player to be able to switch this way.

1 Like

Actually, there’s a setting, as far I know, on all mobile devices that players can toggle that prevents their screen from flipping. so you won’t need to worry about that.

Also, Roblox games by default don’t flip the screens vertically iirc. They lock it to horizontal.

3 Likes

How would I adjust that setting? Because your able to switch it on my experience.

1 Like

For iphone and ipad:

For android:

2 Likes

Wait, are you sure its not a setting in starterplayer?

1 Like

I’m not sure.

Is there a specific setting that you’re confused with in StarterPlayer that has to do with mobile screen orientation?

1 Like

Devtouchcameramovementmode is what im confused with

DevTouchCameraMovementMode overwrite’s a player’s camera based on the movement the player does in the game. It does not affect screen orientation.

Read here for more info:

2 Likes

So uh how do I make it so you can’t make your screen vertical?

1 Like

It won’t.

By default, Roblox sets your screens to horizontal orientation only when playing a game.

You would have to go out of your way to script your game so the camera would be able rotate vertically.

What do you mean? On mobile you can rotate the screen vertical.

1 Like

Try joining any Roblox game (besides word bomb) and attempt to switch your screen vertically without toggling the setting I mentioned in the beginning. :wink:

Ohhh I thought it was roblox that was making it so you could rotate it. How would I be able to detect if the player rotated it vertical so I could make a custom gui.

Unless you’re specifically intending to make your game have a vertical mobile screen, you won’t have to worry about that kind of situation happening.

The only types of games I’ve seen do this are games such as Word Bomb. They have purposely done this for mobile devices, so it would be easier to type on mobile, which is a necessity for their game.

1 Like

No, I wanted to fix the UI on vertical if someone makes it that way.

https://developer.roblox.com/en-us/articles/Device-Orientation-for-Mobile-Roblox-Games

game.Players.LocalPlayer.PlayerGui.ScreenOrientation = Enum.ScreenOrientation.LandscapeSensor

By default, the screen orientation is always set to Landscape Sensor, meaning it will only switch to Landscape Left or Right but not to Portrait, if you want to know more about this read the article I linked above.

10 Likes