Animation sequence is blocking CFrame updates?

Hi there,

I have this piece of code that simply just rotates my arms along with the camera. However, as soon as I apply an animation to it, the animation overrides the cframe updates. I have tried to use all of the different AnimationPriority’s but that does not seem to help. If I do not play the animations, it works perfectly. Here’s the code:

RunService.RenderStepped:Connect(function()
	if (not equipped) then return; end
	character:WaitForChild("RightUpperArm").RightShoulder.C1 = CFrame.new(character.RightUpperArm.RightShoulder.C1.Position) * CFrame.Angles(-math.asin(-workspace.CurrentCamera.CFrame.LookVector.Y)/-2, 0, 0)
	character:WaitForChild("LeftUpperArm").LeftShoulder.C1 = CFrame.new(character.LeftUpperArm.LeftShoulder.C1.Position) * CFrame.Angles(-math.asin(-workspace.CurrentCamera.CFrame.LookVector.Y)/-2, 0, 0)
	character:WaitForChild("UpperTorso").Waist.C1 = CFrame.new(character.UpperTorso.Waist.C1.Position) * CFrame.Angles(math.asin(-workspace.CurrentCamera.CFrame.LookVector.Y)/2, 0, 0)
end)

And here’s a video for explanation:

1 Like