Universal Script ๐Ÿ“Œ
926 Views
1.5k Executions

Rotation Lock

Universal Script ๐Ÿ“Œ
vincent009
vincent00910 followers
7 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

This script forces the playerโ€™s screen orientation to stay locked in LandscapeRight (Left because the landscaping is reverse) It works by: getting the local player and their PlayerGui setting a target orientation with Enum.ScreenOrientation.LandscapeRight repeatedly reapplying that orientation every frame using RunService.RenderStepped That means even if the game or device tries to change the orientation, this script keeps it fixed. The comment notes that you can switch it to LandscapeLeft by changing Right to Left. Auto execute is recommended for no annoying auto tilting for mobile Better version of @majwejner script Enjoy the script!

View Raw
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local LOCK_ORIENTATION = Enum.ScreenOrientation.LandscapeRight -- change the "Right" to "Left" if you don't like the way it set

RunService.RenderStepped:Connect(function()
    playerGui.ScreenOrientation = LOCK_ORIENTATION
end)


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Universal Script ๐Ÿ“Œ
4.6k
3.0k
Bumped 51 minutes ago
Script hub
9.7k
70.7k
Bumped 2 hours ago
Key System
Script hub
187.0k
1.9M
Bumped 4 hours ago
Key System

Script hub

#13 this week

Verified script badgeAirflow HUB

Script hub
602.2k
52.8k
Bumped 4 hours ago
Script hub
45.6k
11.1k
Bumped 5 hours ago
Key System
Paid

Script hub

#25 this month

Verified script badgeZekeHub - 58 Games, 1,300+ Features