Character not rotating in first person / shiftlock

I tried to reattach my camera to character head and something wrong happen:

I dont know why video glitched :sad:

As you can see, character wont rotate when i turn on shiftlock

Script:

--starter character script

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera

camera.CameraSubject = script.Parent:WaitForChild("Head")

The camera do attach to the head but shiftlock is broken

2 Likes
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = script.Parent:WaitForChild("Head")


my camera locked in one place sorry your script dont work ig :frowning:

EDIT: fixed the script myself haha :slight_smile:

local plr = game.Players.LocalPlayer
local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local rootpart,head = char:WaitForChild("HumanoidRootPart"),char:WaitForChild("Head")
game:GetService("RunService"):BindToRenderStep("CameraOffset",Enum.RenderPriority.Camera.Value-1,function()
	hum.CameraOffset = (rootpart.CFrame+Vector3.new(0,1.5,0)):pointToObjectSpace(head.CFrame.p)
end)

I know you found a solution, but the reason it didn’t work is because you have to set the CameraSubject to Humanoid instead of Head so it would work properly.

1 Like