This a local script in the starter gui. Its for a in-game phone and basically I want it to put the screen in portrait mode when opening the phone since it can be much bigger and easier to use that way. Iv’e seen other games do this, for example when you walk up to a fishing spot on meepcity, it puts your screen in portrait and I just checked meepcity again to see if it works and it still does
local gui = game.Players.LocalPlayer.PlayerGui
script.Parent.Button.MouseButton1Click:Connect(function()
local BearChat = gui.PopUps.BearChat
BearChat.Visible = true
gui.Main.Enabled = false
BearChat.Size = UDim2.new(0,0,0,0)
BearChat.Position = UDim2.new(0.5,0,1,0)
BearChat:TweenSize(UDim2.new(1, -40, 1, -40), "Out", "Quint", .3, true)
BearChat:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Quad", .15, true)
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
if game.Players.LocalPlayer.PlayerGui:FindFirstChild("TouchGui") then
game.Players.LocalPlayer.PlayerGui.TouchGui.TouchControlFrame.Visible = false -- btw, this part works so I know it's finding the touch gui
game:GetService("StarterGui").ScreenOrientation = Enum.ScreenOrientation.Portrait
end
end)
Ok, i posted a screenshot of the phone, what i want is when i open it on mobile it will make the game portrait while its open so it will cover more of the screen, on computer its fine cuz of the bigger screen, that portion of the script is not working