I’m changing the C0 value of RightShoulder and LeftShoulder Motor6D’s, but they don’t seem to be in sync with render or character, how do I fix this problem?
local Char = Player.Character or Player.CharacterAdded:Wait()
local UpperTorso = Char:WaitForChild("UpperTorso")
local RightShoulder = Char:WaitForChild("RightUpperArm"):WaitForChild("RightShoulder")
local LeftShoulder = Char:WaitForChild("LeftUpperArm"):WaitForChild("LeftShoulder")
local CamOffset = CFrame.new(-0.05, 1.51, 0.51)
local RightArmC0 = CamOffset:ToObjectSpace(CFrame.new(1, 0.563, 0))
local LeftArmC0 = CamOffset:ToObjectSpace(CFrame.new(-1, 0.563, 0))
game:GetService("RunService").RenderStepped:Connect(function(deltaTime)
if Equipped then
Player.CameraMaxZoomDistance = 0.5
RightShoulder.C0 = UpperTorso.CFrame:ToObjectSpace(Camera.CFrame:ToWorldSpace(RightArmC0)) * RightShoulder.C1
LeftShoulder.C0 = UpperTorso.CFrame:ToObjectSpace(Camera.CFrame:ToWorldSpace(LeftArmC0)) * LeftShoulder.C1
else
Player.CameraMaxZoomDistance = 30
end
end)