Custom running animation isn't replicating?

https://i.gyazo.com/fb3fed6fdd5b9a04f9f1ecac1168dc59.gif

All I’ve done is I copy the “Animate” script from the player character, change the animation id inside the script

and use this script to change the player’s animation to my custom one

game:GetService("Players").PlayerAdded:connect(function(player)

    player.CharacterAdded:connect(function(character)
	
	    local AnimationScript = character:WaitForChild("Animate")
	    AnimationScript:Destroy()
	
	    for _,v in pairs(character.Humanoid:GetPlayingAnimationTracks()) do v:Stop(0) end
	
	    script.Animate:Clone().Parent = character
	    character.Animate.Disabled = false
	
	    for _,v in pairs(character.Humanoid:GetPlayingAnimationTracks()) do v:Stop(0) end
			
    end)

end)

but when I play in a public server the running animation doesn’t replicate most the time, usually after a jump. I don’t understand why?

Here is the .rblx of the game
AnimRepro.rbxl (19.8 KB)

5 Likes

I’ve noticed this happening in my tests for animations. I’m sure there’s an easy fix, it might be about whether or not the animation is set to Looping.

1 Like

Just a heads up, don’t use connect (use Connect), It is depreciated (More here). As for your problem you HAVE to have the animation in your inventory or the animation must be for sale. This is simply to stop players stealing other animations, if that doesn’t work make sure you are changing the Animation ID under the value in the script, screenshot for reference:

I hope this helped you!

1 Like

I created the animation and it’s in my inventory, the problem isn’t that the animation isn’t playing at all, but that it works for some time, but when a player jumps or does something then the other people in the server cannot see the running animation that is playing locally for the player. I don’t know why this is happening, changing the value doesn’t help and I’m pretty sure the values are overwritten inside the script anyway.

1 Like

Have you made sure the animation priority is set to ‘Movement’? Roblox may have not approved your animation either.

1 Like

I had the animation set to “Core” so I just re-uploaded it as “Movement”, but it still does the same thing :confused: it also has nothing to do with Roblox approving my animation, because it plays like 1/4th of the time the players start running, but once they jump it completely stops and their characters just float around. This is so frustrating!!

This also happens in a local server so it’s very easy to test out, could you go ahead and test it out with your own animation and see if it does it as well?

As you can see the animation plays locally on the left side (the legs are meant to be like that), but no one else can see it in the server.

EDIT:

I just figured it out! Apparently you can’t replace the “Walk” animation with any random animation, I think the script checks for the length of that animation or something which prevents it from playing if it’s the wrong length. To fix it I imported the original “Walk” animation and made my own animation around it.

4 Likes

SIs it possible if you can give me a model with the animation pre-loaded into it so I can try and resolve the issue?

I recently had the same issue. This problem occurred because my walking and running animations were using same ID, so I fixed it by uploading a separate animation for the walk animation.

This is an old thread, but I hope this message may also help those who are struggling with the same problem.

3 Likes

Have been having the same issue lately.

I wonder why this happens though. It works perfectly fine locally, but it doesn’t replicate the animation to other people.

The script is the exact same, just the animation being different.

Has anyone found any good solution to this issue?

2 Likes

I’ve also been experiencing this. This unexpected behavior in regard to the replication of animations is quite frankly ridiculous–especially when the replication of Roblox’s own animation script can be broken by changing the ID of the asset. (In my case, the asset was an exact copy of the Roblox running animation, but reuploaded, and it failed to replicate).

This is part of a larger and unaddressed problem pertaining to the unreliable replication of animation weights, see AnimationTrack:AdjustWeight improperly replicates (unresolved and impacting development since 2016)

@MetatableIndex

You have to ensure that you don’t have more than 1 animation track with the same animation object asset ID playing at once, otherwise they will be replicated improperly to other client when trying to blend the animation weight (only one animation track will actually play).

2 Likes