Animations Incorrectly Replicating

Hello, I’ve been getting this strange issue where my idle / stance animations will replicate but no movement except for sprinting. I’m running my custom animation handler and I can’t figure this out why this would happen.

On the third video, it would play the backward-walking animation until a stance is changed. Afterwards, zero movement would play except sprinting.



I have 4 animations each for walking, crouching, and crawling. I make sure that the priorities of the animations I need to play are appropriately set and their weights don’t hit zero. Am I doing something wrong?

Here’s a portion of the monstrosity of the code:

weights.walk = weights.walk
		+ ((math.clamp(walkRunWeight * walkForAlpha, 0.001, math.huge) - weights.walk) * weightDamping)
	weights.walkBack = weights.walkBack
		+ ((math.clamp(walkRunWeight * walkBackAlpha, 0.001, math.huge) - weights.walkBack) * weightDamping)
	weights.walkLeft = weights.walkLeft
		+ ((math.clamp(walkRunWeight * walkLeftAlpha, 0.001, math.huge) - weights.walkLeft) * weightDamping)
			* enableStrafe
	weights.walkRight = weights.walkRight
		+ ((math.clamp(walkRunWeight * walkRightAlpha, 0.001, math.huge) - weights.walkRight) * weightDamping)
			* enableStrafe

	weights.crouch = weights.crouch
		+ ((math.clamp(crouchMoveWeight * walkForAlpha, 0.001, math.huge) - weights.crouch) * weightDamping)
	weights.crouchBack = weights.crouchBack
		+ ((math.clamp(crouchMoveWeight * walkBackAlpha, 0.001, math.huge) - weights.crouchBack) * weightDamping)
	weights.crouchLeft = weights.crouchLeft
		+ ((math.clamp(crouchMoveWeight * walkLeftAlpha, 0.001, math.huge) - weights.crouchLeft) * weightDamping)
	weights.crouchRight = weights.crouchRight
		+ ((math.clamp(crouchMoveWeight * walkRightAlpha, 0.001, math.huge) - weights.crouchRight) * weightDamping)

	weights.prone = weights.prone
		+ ((math.clamp(proneMoveWeight * walkForAlpha, 0.001, math.huge) - weights.prone) * weightDamping)
	weights.proneBack = weights.proneBack
		+ ((math.clamp(proneMoveWeight * walkBackAlpha, 0.001, math.huge) - weights.proneBack) * weightDamping)
	weights.proneLeft = weights.proneLeft
		+ ((math.clamp(proneMoveWeight * walkLeftAlpha, 0.001, math.huge) - weights.proneLeft) * weightDamping)
			* enableStrafe
	weights.proneRight = weights.proneRight
		+ ((math.clamp(proneMoveWeight * walkRightAlpha, 0.001, math.huge) - weights.proneRight) * weightDamping)
			* enableStrafe

	weights.run = weights.run + ((math.clamp(runAlpha, 0.001, 1) - weights.run) * weightDamping)

	if not hum.Sit then
		if self:GetStance() == "Crouching" then
			dynamicAnim.walk:AdjustWeight(0)
			dynamicAnim.walkBack:AdjustWeight(0)
			dynamicAnim.walkLeft:AdjustWeight(0)
			dynamicAnim.walkRight:AdjustWeight(0)
			dynamicAnim.proneWalk:AdjustWeight(0)
			dynamicAnim.proneWalkBack:AdjustWeight(0)
			dynamicAnim.proneWalkLeft:AdjustWeight(0)
			dynamicAnim.proneWalkRight:AdjustWeight(0)

			dynamicAnim.crouchWalk:AdjustSpeed(walkAlpha * 1.5)
			dynamicAnim.crouchWalk:AdjustWeight(math.clamp(weights.crouch, 0.001, math.huge))
			dynamicAnim.crouchWalkBack:AdjustSpeed(-walkAlpha * 1.5)
			dynamicAnim.crouchWalkBack:AdjustWeight(math.clamp(weights.crouchBack, 0.001, math.huge))

			if enableStrafe == 1 then
				dynamicAnim.crouchWalkLeft:AdjustSpeed(walkAlpha * 1.5)
				dynamicAnim.crouchWalkLeft:AdjustWeight(math.clamp(weights.walkLeft, 0.001, math.huge))
				dynamicAnim.crouchWalkRight:AdjustSpeed(-walkAlpha * 1.5)
				dynamicAnim.crouchWalkRight:AdjustWeight(math.clamp(weights.walkRight, 0.001, math.huge))
			else
				dynamicAnim.crouchWalkLeft:AdjustSpeed(0)
				dynamicAnim.crouchWalkLeft:AdjustWeight(0)
				dynamicAnim.crouchWalkRight:AdjustSpeed(0)
				dynamicAnim.crouchWalkRight:AdjustWeight(0)
			end
		elseif self:GetStance() == "Proning" then
			dynamicAnim.proneWalk:AdjustSpeed(proneAlpha)
			dynamicAnim.proneWalk:AdjustWeight(weights.prone)
			dynamicAnim.proneWalkBack:AdjustSpeed(-proneAlpha)
			dynamicAnim.proneWalkBack:AdjustWeight(weights.proneBack)

			if enableStrafe == 1 then
				dynamicAnim.proneWalkLeft:AdjustSpeed(proneAlpha)
				dynamicAnim.proneWalkLeft:AdjustWeight(math.clamp(weights.proneLeft, 0.001, math.huge))
				dynamicAnim.proneWalkRight:AdjustSpeed(proneAlpha)
				dynamicAnim.proneWalkRight:AdjustWeight(math.clamp(weights.proneRight, 0.001, math.huge))
			else
				dynamicAnim.proneWalkLeft:AdjustSpeed(0)
				dynamicAnim.proneWalkLeft:AdjustWeight(0)
				dynamicAnim.proneWalkRight:AdjustSpeed(0)
				dynamicAnim.proneWalkRight:AdjustWeight(0)
			end

			dynamicAnim.crouchWalk:AdjustWeight(0)
			dynamicAnim.crouchWalk:AdjustSpeed(0)
			dynamicAnim.crouchWalkBack:AdjustWeight(0)
			dynamicAnim.crouchWalkBack:AdjustSpeed(0)
			dynamicAnim.crouchWalkLeft:AdjustWeight(0)
			dynamicAnim.crouchWalkLeft:AdjustSpeed(0)
			dynamicAnim.crouchWalkRight:AdjustWeight(0)
			dynamicAnim.crouchWalkRight:AdjustSpeed(0)
			dynamicAnim.walk:AdjustSpeed(0)
			dynamicAnim.walk:AdjustWeight(0)
			dynamicAnim.walkBack:AdjustSpeed(0)
			dynamicAnim.walkBack:AdjustWeight(0)
			dynamicAnim.walkLeft:AdjustSpeed(0)
			dynamicAnim.walkLeft:AdjustWeight(0)
			dynamicAnim.walkRight:AdjustSpeed(0)
			dynamicAnim.walkRight:AdjustWeight(0)
			dynamicAnim.run:AdjustSpeed(0)
			dynamicAnim.run:AdjustWeight(0)
		elseif self:GetStance() == "Standing" then
			dynamicAnim.crouchWalk:AdjustWeight(0)
			dynamicAnim.crouchWalkBack:AdjustWeight(0)
			dynamicAnim.crouchWalkLeft:AdjustWeight(0)
			dynamicAnim.crouchWalkRight:AdjustWeight(0)
			dynamicAnim.proneWalk:AdjustWeight(0)
			dynamicAnim.proneWalkBack:AdjustWeight(0)
			dynamicAnim.proneWalkLeft:AdjustWeight(0)
			dynamicAnim.proneWalkRight:AdjustWeight(0)

			dynamicAnim.walk:AdjustSpeed(math.clamp(walkAlpha * 1.5, 0, 1))
			dynamicAnim.walk:AdjustWeight(math.clamp(weights.walk, 0.001, math.huge))
			dynamicAnim.walkBack:AdjustSpeed(math.clamp(-walkAlpha * 1.5, -1, 0))
			dynamicAnim.walkBack:AdjustWeight(math.clamp(weights.walkBack, 0.001, math.huge))

			if enableStrafe == 1 then
				dynamicAnim.walkLeft:AdjustSpeed(walkAlpha * 1.5)
				dynamicAnim.walkLeft:AdjustWeight(math.clamp(weights.walkLeft, 0.001, math.huge))
				dynamicAnim.walkRight:AdjustSpeed(-walkAlpha * 1.5)
				dynamicAnim.walkRight:AdjustWeight(math.clamp(weights.walkRight, 0.001, math.huge))
			else
				dynamicAnim.walkLeft:AdjustSpeed(0)
				dynamicAnim.walkLeft:AdjustWeight(0)
				dynamicAnim.walkRight:AdjustSpeed(0)
				dynamicAnim.walkRight:AdjustWeight(0)
			end
		end

		dynamicAnim.run:AdjustSpeed(runAlpha * 1.5)
		dynamicAnim.run:AdjustWeight(math.clamp(weights.run, 0.001, math.huge))
	else
		dynamicAnim.crouchWalk:AdjustWeight(0)
		dynamicAnim.crouchWalk:AdjustSpeed(0)
		dynamicAnim.crouchWalkBack:AdjustWeight(0)
		dynamicAnim.crouchWalkBack:AdjustSpeed(0)
		dynamicAnim.crouchWalkLeft:AdjustWeight(0)
		dynamicAnim.crouchWalkLeft:AdjustSpeed(0)
		dynamicAnim.crouchWalkRight:AdjustWeight(0)
		dynamicAnim.crouchWalkRight:AdjustSpeed(0)
		dynamicAnim.proneWalk:AdjustWeight(0)
		dynamicAnim.proneWalkBack:AdjustWeight(0)
		dynamicAnim.proneWalkLeft:AdjustWeight(0)
		dynamicAnim.proneWalkRight:AdjustWeight(0)
		dynamicAnim.walk:AdjustSpeed(0)
		dynamicAnim.walk:AdjustWeight(0)
		dynamicAnim.walkBack:AdjustSpeed(0)
		dynamicAnim.walkBack:AdjustWeight(0)
		dynamicAnim.walkLeft:AdjustSpeed(0)
		dynamicAnim.walkLeft:AdjustWeight(0)
		dynamicAnim.walkRight:AdjustSpeed(0)
		dynamicAnim.walkRight:AdjustWeight(0)
		dynamicAnim.run:AdjustSpeed(0)
		dynamicAnim.run:AdjustWeight(0)
	end
end

Thank you for any help

2 Likes

Seems that the server isn’t being “alerted” or notified of the animation changes. Or could be an issue that the server doesn’t have the animation file and thus cannot replicate.

Are you overwriting the core animations? If so check Rblx Docs - Animations and go down to Replace Default Animations. Could be something missed on the server end? Could also be an issue with the fact that its a custom handler; could something regarding ownership, etc. (sorry, I dont know much about custom animation handlers)

Is this script provided locally in StarterPlayerScripts?
If you’ve done that, I’d recommend running a test and then having another window open as the server view to see if the server is picking up on the animations at all.

1 Like

I will try overwriting the core animations, the entire script itself has been deleted but maybe it’s still passing themselves over.

No problems with ownership since everything is local and loaded by the humanoid animator (I don’t see how anything else could own the animations). The custom animations handler is stored in a module and is immediately run under StarterPlayerScripts when the character spawns so there’s no problem with loading or the placement of the local script.

Already experienced something like this a while ago, and seemingly it’s still an issue - this is caused by setting animation weight to 0. Now, I don’t know why it happens, but it just does.

Refer to Animation weight set to 0 stops all movement animation from playing on other clients
The fix is literally just.. not setting weight to 0 (instead, opt for a really small number).

1 Like

Just implemented both fixes - overwritten the Default Animations according to documentation and your fix by going through my entire framework making sure weights aren’t set to zero.

This worked, but now my walking forward animation still goes backwards, walking backwards is normal, crouching forward doesn’t play the movement animation but crouching backward does, and all the directional movement that I’ve made for crawling works.

The only thing I can think of is that I have to upload backward and both left and right strafing animations for walking and crouching, instead of reversing said animations. Why would I have to do this??? Roblox animations are handled horrendously. I may have to upload a bug report but it will probably not be fixed for a while.

1 Like