Animations are replicating, but not correctly

(client playing the animations on left, and another client on right)

The animations look normal on the client playing them, but for the server and other clients they seem to have some sort of conflict with the other humanoid animations (jump, idle, etc). All of the animations (unsheathe, attack, etc) have their priority set to action and the sword and shield models are connected with a motor6D to the UpperTorso

I’ve searched and I can’t find anything dealing with this exact problem, but I’ll keep searching until I either get a response here, or I find it.

Code (but I don't think the issue is the code itself)
function SwordAndShield.new(replica)
    local self = setmetatable({}, SwordAndShield)
    self._maid = Maid.new()
    self._replica = replica
    self._character = replica.Tags.Character
    self._humanoid = self._character.Humanoid 
    self._weaponConfig = replica.Tags.WeaponConfig
    self._model = replica.Tags.Model
    

    local animations = self._character.Animations
    self._sheatheAnimation = self._humanoid:LoadAnimation(animations.Sheathe)
    self._unsheatheAnimation = self._humanoid:LoadAnimation(animations.Unsheathe)
    self._blockAnimation = self._humanoid:LoadAnimation(animations.Block)
    self._attackAnimation = self._humanoid:LoadAnimation(animations.Attack)

    self:InitSharedModule()
    self:SetupInput()
    self:SetupNetworking()

    self._fsm = Fsm.create({
        initial = "idle",
        events = {
            {name = "sheathe",  from = "idle",  to = "sheathe"},
            {name = "unsheathe",  from = "sheathe",  to = "idle"},
            {name = "block", from = "idle", to = "block"},
            {name = "unblock", from = "block", to = "idle"},
            {name = "attack", from = "idle", to = "attack"},
            {name = "endattack", from = "attack", to = "idle"},
        },
        callbacks = {
            on_enter_sheathe = function(fsmSelf)
                self._sheatheAnimation:Play()
            end,
            on_leave_sheathe = function(fsmSelf)
                self._sheatheAnimation:Stop()
            end,
            on_enter_idle = function(fsmSelf)
                self._unsheatheAnimation:Play()
            end,
            on_leave_idle = function(fsmSelf)
                self._unsheatheAnimation:Stop()
            end,
            on_enter_block = function(fsmSelf)
                self._blockAnimation:Play()
            end,
            on_leave_block = function(fsmSelf)
                self._blockAnimation:Stop()
            end,
            on_enter_attack = function(fsmSelf)
                self._attackAnimation:Play(.1, 1, self._attackAnimation.Length/self._weaponConfig.Stats.AttackSpeed)
                local animConn
                animConn = self._attackAnimation.Stopped:Connect(function()
                    animConn:Disconnect()
                    fsmSelf.endattack()
                end)
            end,
            on_leave_attack = function(fsmSelf)
                
            end,
            on_enter_state = function(fsmSelf, event, from, to)
                if FSM_DEBUG then
                    print("[EnterState] [Event]: " .. event .. " [From]: " .. from .. " [To]: " .. to)
                end
            end,
            on_leave_state = function(fsmSelf, event, from, to)

            end

        }
      })
      
      
      self._fsm.sheathe()

    return self
end
2 Likes

After some more experimenting the issue isn’t with the roblox animation script, as I disabled it and I had the same issue (weapon was glitching after attacking). The most annoying problem here is that it works fine for the client playing it but not for others, so I’m starting to assume this is just a roblox bug that I can’t do anything about, but I hope this isn’t the case.

Is it fixed?
I was gonna say: “Use a remoteevent in a localscript.”

for whatever reason the video isnt loading but it could be to do with animation priority level basically if your current animation is a lower priority than the other animations that could potentially play e.g if u jump the jump animation will try play so when ur uploading the animation set its priority to like action or sumn so that nothing will out rank it and play over it

1 Like

This was half of the solution, all of the weapon animations had their priority set correctly, but for some reason the jump/fall animation was set to action when using player choice animations, and setting it to standard fixed it.

The other issue was the attack glitching out, but the problem was a small delay in between the attack animation stopping and the idle animation playing which was an easy fix.