Animation ran on server, but only replicating to client and not to server

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I have a server side script that loads the animations, and then plays them later when needed

  1. What is the issue? Include screenshots / videos if possible!

The animations are working perfectly on the client, but the animations don’t work at all server-side.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried adding an animator to the animation controller I was using, but it didn’t help. I also tried setting the player ownership of all the parts I want to animate to server side. For some reason the animations magically work when I move the character on the server in roblox studio.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Here’s the script I was using. It’s just a snippet of loading the animations

local Humanoid = script.Parent.Parent:WaitForChild("Humanoid", 9999)
local CombatMain = require(game.ServerScriptService.CombatMain)
local Animator = Instance.new("Animator", script.Parent.AnimationController)
local Animations = {
	["Idle"] = Animator:LoadAnimation(script.Parent.StandAnimations.IdleAnimation),
	["Barrage"] = Animator:LoadAnimation(script.Parent.StandAnimations.BarrageAnim),
	["Punch1"] = Animator:LoadAnimation(script.Parent.StandAnimations.Punch1),
	["Punch2"] = Animator:LoadAnimation(script.Parent.StandAnimations.Punch2),
	["Punch3"] = Animator:LoadAnimation(script.Parent.StandAnimations.Punch3),
	["Block"] = Animator:LoadAnimation(script.Parent.StandAnimations.BlockAnimation)
}
1 Like

Where are these animations stored?

1 Like

Use a remote event. Correct me if i am wrong.

It’s on a server script, not a local one

They are stored in a model with the script

Correct me if i’m wrong but Isn’t the animator your looking for in the Humanoid thats been defined? Since I see your creating an animator from the script.

I’m using an animationcontroller, not a humanoid

It’s a Jojo game, so i’m making the stand have seperate animations from the player

Found the fix:

if script.Parent.HumanoidRootPart.RootPriority == 0 then
	script.Parent.HumanoidRootPart.RootPriority = 1
else
	script.Parent.HumanoidRootPart.RootPriority = 0
end

For some reason if your loop changing the root priority it updates the character and works again idk why it worked but it did. (We are both in the same development team for the same game)