This issue still persists to this very day. From what I was told by a staff member it has to do with when the weight of all the current animations playing exceed 1. In which case all new animations called to play will no longer do so until every animation that made that weight rise over one completely stop.
Does it happen all the time or only happening from time to time? Also what’s the AnimationPriority of the Animation?
The issue happens pretty much all of the time. The cause is somewhat random, and most animation triggers are done via Action priority animations. Generally our combat type animations with play frequently. Even months later I can simply hop on, and have someone punch and slice a few times, to have their animations broke for what could be a few seconds, or even numerous minutes.
So recently we tried to completely redo the entire system for playing animations. After only a few days of working on the system we encountered the exact same issue. In total the entire system the rework had animation count wise was about 18. Without fail regardless of what we did the bug where all animations stop replicating persists. We wait for the animatior on the client, we ensure it exists for the server, we don’t touch a single thing about the character, we don’t have an insane amount of animations playing at once, and all of our priorities are set to what they should be. Combat animations are action priority, and movement animations are movement priority. At this point I have absolutely no idea what we could be doing wrong. Nobody else really seems to have encountered this issue anywhere.
I’ve encountered this issue before. Still haven’t come up with any fix E.E
Alright, I’ve gone a step even further and created a completely isolated version of our project that contains the animation bug. The place isn’t copy locked, so the code can be reviewed by anyone.
Rudimentary Controls
Left Click: Light Melee
Left Shift: Shift Lock
Right Click: Heavy Melee (Requires shift lock)
Space x1: Jump
Space x2: Double Jump
Double WASD direction: Dash
Left Alt: Crouch
Left Control: Walk
How to replicate the bug
There are two ways you can go about viewing this bug for yourself. One is to hop into studio and use the Test function to test with as many players as you want. Simply run around dashing, jumping, and attacking until you see the animations no longer replicating in the server view.
The other way to replicate this is to get a friend and actually join the game. By following the same process as above one or both of you will end up not viewing the other’s animations.
–NOTE–
Replicating this doesn’t always work every time. The chances of it happening are entirely random. Below is an example of what the results look like from studio
https://gyazo.com/375c356150a1f1cbf17ee59469f4d80c
https://gyazo.com/2e9fe22c97d7e7b55b089117456c29ed
https://gyazo.com/27bd1d9d73ac39579d6e7e97fad43d7b
Check that there is an Animator object in the player’s Humanoid. If not you need to call LoadAnimation on the server to create one. These are required for players to animate from the client (which is documented on the devhub)
Creating an Animator outside of calling LoadAnimation is also acceptable enough from the server’s end. That is, unless LoadAnimation does other replication control work on the backend that instancing the Animator does not resolve.
if not Humanoid:FindFirstChild("Animator") then
Instance.new("Animator", Humanoid)
end
So I went ahead and added WaitForChild’s on the Server end, which then informs the client the animator exists for it, and have the client also wait for it in a similar fashion. However, this didn’t change the outcome as with my first test the animations broke right away.
–Edit-----
If you want, I believe the place isn’t copy locked so you can review what code exists there. Both the creator of the base combat system, and myself are not experts at animation handling systems. So I’d feel like it would be quite possible for us to have some sort of user error that’s causing this whole fiasco
I recently made some code that prints out all current tracks playing on the animator using Humanoid:GetPlayingAnimationTracks from the server. Below is that is printed right before all animations stop replicating, as well as a corresponding image for my next discovery.
https://gyazo.com/6e4aa449a9c51c0fffebc0c510618db4
Due to a similar reply I had from a test and post a while back I had assumed the fact that the total weight was over 1 which caused the issue. However in multiple tests I spiked at total weights greater than 4 and didn’t have a single issue with replication.
https://gyazo.com/7673566386863b7cba2c6f7df881b470
The animation issue seems to stem from a custom directional update to the default animation script that I had made. However, I haven’t been able to pull off a single test where I can isolate what exactly my alterations cause that’s so horrible. Below I’ve linked an upload of the altered script.
Another odd behavior to mention is that when this whole fiasco triggers at least once, and fixes itself, it never occurs for the same client again. (Even animations that are loaded can cause this issue, so as far as I can tell it has nothing to do with whether or not they’re loaded) To “fix” the issue you just need to sit still and move after around 4-5 seconds. I’ve tried to simulate this by stopping all playing animations, but for some reason this doesn’t have the same outcome
Animate(Altered).rbxm (6.8 KB)
Alright, so I recently found myself a hot fix. Due to the fact that this issue only occurs once per player, and that I can never predict when it’ll happen (it can happen right when the first animation players, or hours after playing) I created a script that simply looks for when the client is no longer sending any animations. This checks the client ever second or so. (I will need to tweak the rate to account for larger servers)
The hot fix is pretty simple, all animations are stopped on the client, and no new animations are allowed to be played until you wait around 3 seconds, which is some magical number that is just around the exact time to fix everything up. The code is as follows
game.Players.PlayerAdded:Connect(function(player)
local Temp = script.Temp
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
repeat wait() until character.Parent == game.Workspace
local tempTrack = humanoid:LoadAnimation(Temp)
local Fix_Animations = player:WaitForChild("PlayerStates"):WaitForChild("Fix_Animations")
wait(3)
print("Hot fix ready")
local fixing
while true do
if not fixing then
local tracks = humanoid:GetPlayingAnimationTracks()
if tracks[1] == nil then
fixing = true
Fix_Animations.Value = true
game:GetService("ReplicatedStorage"):WaitForChild("Fix_Animations"):InvokeClient(player)
Fix_Animations.Value = false
player:WaitForChild("PlayerStates"):WaitForChild("Animation_Fix_Prepped").Value = true
fixing = false
end
end
print(player.Name)
wait(1)
end
end)
Once the Fix_Animations instance is set to true, no new animations can load. The remote function is there to tell the client to stop all current playing animations and wait before returning to the server after the initial wait time.
—Issues with this fix—
It requires a constant loop on the server to determine if a player is broken. Even after being “fixed” there’s a chance the player might break right after, as one animation slips through with latency.
As with any “hot fix” this is not a complete solution, this only stops the issue once it happens. It does absolutely nothing to prevent the issue.
This is rather late but, I’ve run into this issue. How would you have those properties replicate properly? Certain animations require the looped
property while other’s don’t.
The priority setting (e.g. core, action, etc) and the looped property will replicate to other clients based on the properties of the uploaded animation. I.e, if looped was enabled in the animation editor, the animation will be looped on all other clients even if you set Looped to false locally.
There’s no way to replicate TimePosition, but I’ve literally never had any reason to use that property, and can’t think of any reason why you would want to.
WeightCurrent is read-only, so writing to it doesn’t do anything. You can use AdjustWeight to change the weight of the animation, which is hugely powerful and also replicates.
In general, if you are trying to replicate properties that otherwise don’t replicate, you are probably misunderstanding how the animation system works. (With the exception of crappy Roblox bugs).
Alright, so it’s been a while since I mentioned that I found a “Hot Fix” for the issue. And as all hot fixes go it no longer works. We’re now back to square one with this whole fiasco. The exact same things as stated throughout this wonderful adventure still stay true.
- There are absolutely no 100% guaranteed triggers for the issue
- It isn’t related the the frequency or quantity of animations playing
- It isn’t related to any issues with weight, or priority
- It can randomly just “fix” itself and never appear
- There’s a slim chance that a player might never see this, and there’s a good chance they will always see this
- Even when I stop every playing animation on the client for any amount of time and let every animation finish playing/get stopped it still happens
I have a question relating to the consistency of the inconsistent replication: Do the animations fail to replicate after you have already played that animation (on that player) when you try to play it again or is it just completely random?
The issue seems to be entirely random, in the videos I’ve linked prior in the forum you can see the same animations playing multiple times before creating the issue. This specific video shows me doing the same process multiple times (tapping walking and dashing in multiple directions and left/right clicking) yet the replication randomly stops functioning without a repeated process being the actual trigger
The exact same problem happened to me now.
I rewrote Roblox’s default animate script with few lines only, which detect humanoid’s state and play it’s respective animations with the lowest priority (Walk, Sprint, Climb etc.) Then I also have my tool animations, their priority varies above the lowest one. However sometimes it doesn’t play any animation at all. This only happen after I rewrote the animate script with my own custom one.
This problem doesn’t happen everytime and usually fixed after player respawns, I saw this bug while testing with 2 players in studio before, it appears that the server will play the animation but it doesn’t play on the client, I can’t concretely confirm this yet since I can’t easily repro this in Roblox Studio, however it happens a lot in game. Here’s the game if you’re interested on seeing the bug.
I applied your method which creates an animator on server upon CharacterAdded but it took no effect, is there any direct solution yet? I saw about something related to AnimationWeight and I’m not really clear about them, in the default Roblox Animate script, it does a lot of things to AnimationWeight but so far, I don’t.
This might really be an engine bug, I’m pretty sure that games such as Arsenal, Counter Blox and R2DA also suffer from the same problem.
Bug still persists to this day 3 years later. Roblox doesn’t seem to care at all.