-- 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 -- GUI (same as before) local screenGui = Instance.new("ScreenGui") screenGui.Name = "RotateCamGui" screenGui.Parent = Player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 300, 0, 100) frame.Position = UDim2.new(0.5, -150, 0, 10) frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) frame.BackgroundTransparency = 0.2 frame.BorderSizePixel = 0 frame.Parent = screenGui local leftBtn = Instance.new("TextButton") leftBtn.Size = UDim2.new(0.45, 0, 0.8, 0) leftBtn.Position = UDim2.new(0.05, 0, 0.1, 0) leftBtn.Text = "↺ Left 45° (<)" leftBtn.TextScaled = true leftBtn.Parent = frame local rightBtn = Instance.new("TextButton") rightBtn.Size = UDim2.new(0.45, 0, 0.8, 0) rightBtn.Position = UDim2.new(0.5, 0, 0.1, 0) rightBtn.Text = "↻ Right 45° (>)" rightBtn.TextScaled = true rightBtn.Parent = frame -- Button actions leftBtn.MouseButton1Click:Connect(function() rotateCamera(-45) end) rightBtn.MouseButton1Click:Connect(function() rotateCamera(45) end) -- Keyboard shortcuts UserInputService.InputBegan:Connect(function(input, proc) if proc then return end if input.KeyCode == Enum.KeyCode.Comma then -- '<' rotateCamera(-45) elseif input.KeyCode == Enum.KeyCode.Period then -- '>' rotateCamera(45) end end) -- ✨ AUTO CLICK (once after 2 sec) local autoRun = false -- set true if you want it to keep looping local function autoRotate() rightBtn:Click() -- press Right wait(0.1) -- 0.1s delay leftBtn:Click() -- press Left end if autoRun then spawn(function() while wait(2) do -- every 2s autoRotate() end end) else -- run once after 2 sec delay delay(2, autoRotate) end