-- LocalScript local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Player = Players.LocalPlayer local Camera = workspace.CurrentCamera repeat wait() until Camera.CameraType == Enum.CameraType.Custom local function rotateCamera(deg) local root = Player.Character and Player.Character:FindFirstChild("HumanoidRootPart") if not root then return end local newCFrame = CFrame.Angles(0, math.rad(deg), 0) * Camera.CFrame Camera.CFrame = CFrame.new(Camera.CFrame.Position) * newCFrame.Rotation end local function restoreCamera() rotateCamera(-45) -- left wait(0.000000000001) rotateCamera(45) -- back right (net 0°) end -- GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "RotateCamGui" screenGui.Parent = Player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 200, 0, 50) frame.Position = UDim2.new(0.5, -100, 0, 10) frame.BackgroundColor3 = Color3.fromRGB(60, 60, 60) frame.BorderSizePixel = 0 frame.Draggable = true frame.Active = true frame.Parent = screenGui local button = Instance.new("TextButton") button.Size = UDim2.new(1, 0, 1, 0) button.Text = "↺↻ Rotate" button.TextScaled = true button.Parent = frame button.MouseButton1Click:Connect(restoreCamera) -- Optional: Visual feedback button.MouseButton1Down:Connect(function() button.BackgroundColor3 = Color3.fromRGB(100, 100, 255) end) button.MouseButton1Up:Connect(function() button.BackgroundColor3 = Color3.fromRGB(40, 40, 40) end)