
926 Views
1.5k Executions
Rotation Lock
Universal Script ๐
vincent00910 followers
7 months ago
Please login to perform these actions:Does it work?
No reports yetNo 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!
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
0Log in to join the conversation. Login
No comments yet. Be the first!







