After setting a players character their animations stop working

I’m trying to implement a skins system. I’ve done this by making a clone of the skin and then setting the players character to this skin:

local skin = game:GetService("ServerStorage").Skins.Skin1.StarterCharacter
	
player:LoadCharacter()
local newSkin = skin:Clone()
newSkin.Name = player.Name
player.Character = newSkin
newSkin.Parent = workspace

This seemed to work until I tried it in multiplayer mode. As it turns out, the animations are only visible to the local player and the other players couldn’t see any animation.

I haven’t been able to find a solution to this. The only way I can get the animations to work is by setting the StarterCharacter inside of the StarterPlayer. I doubt this is the way you’re supposed to do it though, as it gives the client a lot of responsibility.

You shouldn’t really ever be manually assigning to player.Character. StarterCharacter exists for custom characters, and will handle all the proper referencing needed by the engine. There’s a possibility you’re memory leaking the character created by player:LoadCharacter() as well.

If you really don’t want to use StarterCharacter; then the animation problem is most likely a result of the client not having NetworkOwnership over it’s new custom character. This will allow animations to be played on the owner client, then replicate them to the other clients.

So I found the problem. Turns out the humanoid I had inside of the character wasn’t proper and for some reason caused the animations to not replicate to the server.

1 Like