February 7, 2019, 3:06am
I’m currently experimenting with the AdjustWeight() function of AnimationTracks in order to achieve a footplanting-esque feel as the player walks in 8 different directions.
I’ve gotten both the animations and code down already, and it works nice and smoothly, but I’m struggling with the weights not being replicated to the server.
Here’s what it looks like:
Animations are definitely being played on the client’s end, but the other players would just see a character trying to transcend time and space while idling.
I’m thinking of just resorting to having the server tell every client that a player is modifying their animations’ weights, but I want to know if this replication “issue” is supposed to be intended (which would be weird if that were the case, seeing as locally created animations could be replicated by the client anyway.)
EDIT 1: It seems this issue has been recurring for many prominent developers since '16.
AnimationTrack:AdjustWeight improperly replicates
February 7, 2019, 3:09am
This probably should have been an Engine Bugs thread but New Members are restricted from that…
EDIT: not features
If you haven’t already, you should take a look at the new member link before the staffs/contributors start yeetin’ on you. It does tell you how to make requests to threads you don’t have access to.
February 7, 2019, 3:21am
Yikes, thought I’ve already covered that thread already. That’s a big whoopsies from my end.
That’s good that it prevented you from doing that, because this is not currently formatted as a feature request. Recommend reading the post linked above + reading over the pinned posts in the Platform Feedback category to get more familiar with the desired posting format for that category.
February 7, 2019, 11:03am
Does it normally replicate when you’re not using the
February 7, 2019, 11:49am
I’m pretty sure that weight replicates…
Who’s creating the
object? Make sure it’s the server. For my game I just dump all my animations in a folder and each character just loads from it.
:LoadAnimation() returns a new
. You’re not actually modifying the
Animation, so you’re free to have multiple characters load the same
EDIT: Actually, also make sure that you never set the animation’s weight to 0 (see near the bottom of the thread for more info on why this is problematic)
February 7, 2019, 11:57am
I’m just not sure if weight replicates if you adjust it from the client even if the animation was created on the server.
February 7, 2019, 11:58am
I’m pretty sure it does. It’s what I’m doing for my game right now. Besides, it would suck if it didn’t, because latency would cause animations to lag otherwise.
February 7, 2019, 12:01pm
I just thought weight doesn’t get replicated because I know that if you adjust the animation speed from the client, the change doesn’t get replicated to the server.
February 7, 2019, 12:01pm
Adjusting the speed of the animation also replicates…
February 7, 2019, 12:06pm
Here’s proof that it does replicate:
I’m guessing that something may have changed recently.
Four animations (2*2 for the lower and upper body halves and direction) get adjusted to 0.5 weight when the character walks diagonally.
EDIT: Just wondering, but did you ever adjust the weight of your animations to exactly zero? I found out the hard way that setting the weight of an animation to 0 stops the animation automatically.
EDIT: For future reference, tick this setting on if you ever want to debug your animations:
February 7, 2019, 12:12pm
You’re right, tested it out now! Aha I was literally 100% sure I were correct, but I were wrong. Glad you pointed this out so I don’t need to make extra animations for running/walking anymore.
February 7, 2019, 12:14pm
Replicating animation weight has been an issue for years, and attempts to fix it haven’t been successful.
Upon further investigation I found out that there is one working way to replicate the weight of animations to other clients:
Play animations with a weight of 1 (not 0)
Ensure AdjustWeight never sets to 0 (0.01 at minimum)
The issue seems to be related to other clients stopping animations when Weight is set to 0. By using this workaround you can achieve your desirable effect until Roblox fixes this issue.
Here is a bug report about this issue; AnimationTrack:AdjustWeight improperly replicates (Please give it some support to give the thread traction; like and post a link to threads describing the issue is still relevant)
February 7, 2019, 12:17pm
The bug report you linked doesn’t mention the zero-weight thing. You should mention it there, too. This bug has definitely bitten me before.
EDIT: Oh now it does.
February 7, 2019, 12:18pm
I’ve just edited my reply to include that info. It might be worth to create a newly updated repo describing the issue with zero-weighting in detail.
I reported that
problem a few months ago
February 7, 2019, 1:28pm
Thanks! Setting the weights to 0 was the problem this entire time.
That’s so odd how the server immediately stops keeping track of the animation weights once it’s set to 0…