My code is supposed to mimic shift lock. But the camera is not changing for some reason. Could someone please help me out?
Here is my code:
local camera = game.Workspace.CurrentCamera local player = game.Players.LocalPlayer -- Listen for the player's character changing player.CharacterAdded:Connect(function(character) wait(5) print("here") print(camera.CFrame) camera.CFrame = camera.CFrame * CFrame.new(1.7,0,0) print(camera.CFrame) end)
You need to make sure the CameraType is scriptable.
local Player = game:GetService('Players').LocalPlayer local Camera = workspace.CurrentCamera local Character = Player.Character or Player.CharacterAdded:Wait() task.wait(5) print('here') print(Camera.CFrame) Camera.CameraType = Enum.CameraType.Scriptable Camera.CFrame = Camera.CFrame * CFrame.new(1.7,0,0) print(Camera.CFrame)