Glitching animations- animation priority suddenly not fully respected? - began today even impacting old experiences

Earlier today in studio I suddenly noticed a very significant animation glitch happening while reloading and moving in my game. It was not happening earlier in the day in studio.
Through my attempts at debugging what was happening w/ the animation, I did not find any animation priority issue or unexpected animations playing.

What’s wild is that is that I then discovered that it is now happening in my published game where I haven’t touched the code in over a week… In fact, I restore backups of my game from over a year ago and found the glitch happening there too, which with 100% certainty this glitching animation never happened before.

I suspect a possible roblox change has caused this due the above facts - is anyone else observing this as of today? Below is a video of the issue.

External Media

Here is my game where you can observe it in action (at least as of this posting…)

1 Like

I managed to get a simple repro place showing the glitch - just using a roblox weapon + playing an animation while running (PRESS “R” while running to play the animation) will cause the glitch.
Note: If the animation in the place file doesn’t play for you when pressing R, you may need to republish it yourself (or substitute an animation you own in for the animation ID as a test)
animationGlitchRepro.rbxl (202.7 KB)

I believe I have narrowed down the glitch culprit to the outputs of this function suddenly being garbage (said function has worked w/o issue for years)

function ShoulderCamera:applyRootJointFix()
	if self.rootJoint then
		local translationScale = self.zoomState and Vector3.new(0.25, 0.25, 0.25) or Vector3.new(0.5, 0.5, 0.5)
		local rotationScale = self.zoomState and 0.15 or 0.2
		local rootRotation = self.rootJoint.Part0.CFrame - self.rootJoint.Part0.CFrame.Position
		local rotation = self.rootJoint.Transform - self.rootJoint.Transform.Position
		local yawRotation = CFrame.Angles(0, self.yaw, 0)
		local leadRotation = rootRotation:toObjectSpace(yawRotation)
		local rotationFix = self.rootRigAttach.CFrame
		
		--**issue is newly introduced in below output...but unclear what roblox recently changed here that would impact it??**
		if self:isHumanoidControllable() then
			rotationFix = self.rootJoint.Transform:inverse() * leadRotation * rotation:Lerp(CFrame.new(), 1 - rotationScale) + (self.rootJoint.Transform.Position * translationScale)
		end

		self.rootJoint.C0 = CFrame.new(self.rootJoint.C0.Position, self.rootJoint.C0.Position + rotationFix.LookVector.Unit)--]]
	end
end

Hi @ph33sh, I believe I have identified the change that caused this issue and have reverted it. Please let me know if that fixed it for you.

Thank you for the code sample, that should help us track down what went wrong.

1 Like

Hi Jon, thank you for the fast response! It does look like the issue is no longer occurring now. :slight_smile:

1 Like