Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Pet animations aren't replicating to other clients?

Asked by 5 years ago
Edited 5 years ago

I read the wiki on it but still unclear as to what's wrong, I have a custom rigged model and the animations work on the client but for some reason do not show for other players. Here's how my pet hierarchy looks so you have an idea:

https://gyazo.com/63bc304a9e318820e0065030a3580773

Here's what I do on the server:

-- parent pet to workspace
pet.Parent = workspace 
-- load animations on server
pet.petModel.controller:LoadAnimation(pet.petModel.controller.move)
pet.petModel.controller:LoadAnimation(pet.petModel.controller.idle)
-- set network ownership for pet root parts
pet.PrimaryPart:SetNetworkOwner(player)
pet.petModel.PrimaryPart:SetNetworkOwner(player)

and this is what i'm doing on the client:

-- load animations on client and :Play() on client
moveAnim = controller:LoadAnimation(controller.move)
idleAnim = controller:LoadAnimation(controller.idle)

The goal is to play the animations on the client and have them replicate to everyone. Any help at all is appreciated! Everything works perfectly except the animations not replicating.

0
Is this your full script? If not, please send it all! rabbi99 714 — 5y
0
shut up you theive @rabbi99 iuclds 720 — 5y

1 answer

Log in to vote
0
Answered by
iuclds 720 Moderation Voter
5 years ago
Edited 5 years ago

In order for this to work, you need to create a single animation remote function. Invoke it when you want an animation played.

RemoteFunction.OnServerInvoke = function(Animation)
--preform serious hack stuff here
Pet.AnimationController:LoadAnimation(Animation)
end)

You'll need it on a server invoke to show it to every client inside the game

Ad

Answer this question