(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