I’m having this issue where the animations are only playing locally, and not replicating to the server after replacing the character’s model with another model that is stored in ServerStorage, with a Animation script inside it already.
This is my code:
local char = Info.Characters[character]
local model = char.Skins[skin].Model:Clone()
local playerChar = player.Character
model.Name = player.Name
player.Character = model
model.Parent = workspace
I’m so confused to why it’s happening, i’ve tried a bunch of fixes on the devforum, and none of them worked.
okay, but when i get the variable player.Character, I am getting the existing character as player.Character returns the character model; I already set player.Character to model; the issue im having is getting the idle animation, walk, etc to replicate from client to server.
The answer is easy see your image there, the script called animate is a local script which is meant for doing things on the client side while on the other hand a server script is for doing things on the server side however but you can change model or properties using a local script. on the other hand we have a server script which is for doing things on the server side and what is done in the server is visible to everyone like your animation for example. So you must input that code into a server script called animate and replace the local script animate with the server script.
I have actually tried this, but it has an issue where it’ll play the animations too late due to server lag, which is why a LocalScript is used to do this in the first place [an if I don’t replace the character, the LocalScript replicates the animations to the server.]
I believe all that would need to be done is to load one of the Character’s animations from a script on the Server so that an Animator object is created. I utilized the solution from the thread referenced below after creating a Custom Character tutorial video, which allowed for animations to replicate properly: