Currently I am doing a small project, and while I am still deciding between a 3RD Person POV or a 1ST Person POV, I need to fix a small issue.
When I added a script to rotate the torso depending on camera angle, It messes with the actual cameras offset. I’ve tried to set the camera subject to the head, which mitigated the issue but presented more issues such as not rotating to the sides and the head + helmet becoming visible which obstructed the view.
–Camera Script
for _, Piece in pairs(Character:GetDescendants()) do
if Piece:IsA("BasePart") and Piece.Name ~= "Head" and not Piece:HasTag("Helmet") then
Piece:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
Piece.LocalTransparencyModifier = Piece.Transparency
end)
Piece.LocalTransparencyModifier = Piece.Transparency
end
end
Client.CameraMode = Enum.CameraMode.LockFirstPerson
Humanoid.CameraOffset = Vector3.new(0, 0.25, -1.27)
local function Bobbing()
end
–Torso Rotation script
local function Look()
local Difference = Camera.CFrame.LookVector:Dot(Vector3.new(0,1,0))
local Angle = Max * Difference
Waist.C0 = OG_CF * CFrame.Angles(math.rad(Angle), 0, 0)
end
RunService.RenderStepped:Connect(Look)