It is not replicating animations to the other clients. It is actually replicating the humanoid states to the other clients so that they can play the animation associated with the current humanoid state.
Looking around the default animation script, you will see that it plays animations locally. There are a lot of these discussions on this dev forum and you’ll find there’s one general thing that is consistent among findings (mentioned below). I don’t see how the pasted code relates to your claim, is there any documentation detailing this “implicit replication?”
Animations played on one client do not replicate to other clients.
Animations played on one client DO replicate to other clients for characters that are player-owned .
Are you even bothering to read the default animation script? Animations played by one client do not replicate to any other. Why do you think it isn’t working for the OP? You could go ahead and even try it on a custom rig right now in fact. If they DID replicate, you’d see a lot more exploiters using animations wouldn’t you?
THE ONLY THING THAT DOES REPLICATE ARE THE HUMANOID STATES
Stop giving false information and actually read up on network ownership before you make those statements.
That has nothing to do with the OP’s post. We are talking about animating custom rigs with an animation controller, not humanoids. Animations PLAYED ON A CLIENT’S ANIMATION CONTROLLER will not replicate to other players.
I am a pretty experienced developer. I don’t want anybody here to get false information. I can tell anybody here that from my experience, animations playing the LocalPlayer’s character will be seen by everybody else. This does not work, however, for other parts added into the character after or at spawn.
Now, I can explain a general idea of how exploiters are not able to play animations. Before a server is run, Roblox will first run a scan and keep reference as too what scripts are part of the game. When an animation is called, Roblox will try to check which script is requesting for it to be played. If it can verify that it is a legit script from the developer’s code, it will replicate. Otherwise, it will play locally to play it safe. The system works well actually, to make sure developers can play animations well and exploiters can’t abuse the system.
I hope this can be a solution to everything here. If you are confused, or think I have a mistake, lemme know dudes.
That is only if it is played on the default roblox character. The OP is talking about a custom rig with an animation controller, not the default character that uses humanoids.
It will work with custom characters if they are named “StarterCharacter” and put under StarterPlayer. They must have a verified RootPart with proper Attachments and Motor6Ds.
That’s because the LocalPlayer has implicit network ownership of their character. Clients can play and replicate animations on anything they have network ownership over.
Source? I can tell you right now a chunk of this is false. Roblox does not keep references to LuaSourceContainers. Exploiters can pass off code to the interpreter the same way your own code from Studio does. Replication has nothing to do with the interpreter, so this is off-topic.
StarterCharacter simply changes the assembly of the character. The backend still passes network ownership over. Having a StarterCharacter changes nothing. Attachments are irrelevant. Motor6Ds are transformed by animations, so yes you will need those to animate at the very minimum.
The OP isn’t using a humanoid and the character model is the cloned roblox character with it’s humanoid removed. You’re honestly just making this stuff up at this point.
Oops, you are right about attachments. I looked; sorry 'bout that.
However, Motor6Ds and the Humanoid have to be properly set up in order to replicate. Otherwise, it will play Locally.
Want me to give an example? I’ll set up demo if you want
This is because of the Animator object created in the Humanoid. If I recall correctly, creating one on the server can resolve the replication issue. Apply the same to an AnimationController.
I’m not making stuff up, I promise.
I think we are also getting off topic with talking about the humanoid (don’t know who did get towards that way, but it’s fine). Remember, we are trying to help @Acreol. Let’s do that bros.
Overall, the AnimationController won’t replicate animations (at least that’s what I would know).
Its not super complicated, it’s how it works.
Good summary. OP’s goal flew over my head while I was skimming last night, and my posts above address a different topic. I apologize for that, but I’ll leave them there just in case for the future.
(Although some references I posted do address the issue with some possible workarounds)
Yeah, this one is what I was referencing. The Animator under the Humanoid is created by the server. The linked thread describes disabling replication, so I flipped the logic around and applied it to an AnimationController.