I am currently having issues with the weapon and arms of the player in first person, in third person it looks fine when a player looks up and down but in first person the weapon goes through the player’s camera
https://gyazo.com/8b323cf6c19339186a36c99a79b36ef9
I’ve tried everything but nothing seems to work.
game:GetService("RunService").RenderStepped:Connect(function()
Character["Right Arm"].LocalTransparencyModifier = Character["Right Arm"].Transparency
Character["Left Arm"].LocalTransparencyModifier = Character["Left Arm"].Transparency
local camCF = camera.CoordinateFrame
local distance = (Character.Head.Position - camCF.p).magnitude
if Gun ~= nil and not Vars.FireStance and Humanoid.Health ~= 0 then
local angleComponent = -math.asin((Mouse.Origin.Position - Mouse.Hit.Position).Unit.Y)
rightShoulder.C0 = CFrame.new(script.O_RS.Value, script.XX_RS.Value, script.ZZ_RS.Value) * CFrame.Angles(angleComponent, script.X_RS.Value, 0)
leftShoulder.C0 = CFrame.new(script.O_LS.Value, script.XX_LS.Value, script.ZZ_LS.Value) * CFrame.Angles(angleComponent, script.X_LS.Value, 0)
toolGrip.C0 = CFrame.new(script.O.Value, script.XX.Value, script.ZZ.Value) * CFrame.Angles(angleComponent, script.Y.Value, script.Z.Value)
neck.C0 = CFrame.new(0, 1, 0) * CFrame.Angles(angleComponent + 1.55, math.pi, 0)
else
rightShoulder.C0 = originalRightShoulderC0
leftShoulder.C0 = originalLeftShoulderC0
neck.C0 = originalNeckC0
toolGrip.C0 = originalToolGripC0
end
end)