Hey, I've made an melee script which makes different animations each time you click, but those animations keep stopping when it is not suppsoed to, they are being interrupted for some reason, i wanted to know how can i make it so that the animations not stop randomly when you fight, here a section from the server script in the tool which makes animations:
moderemote.OnServerEvent:Connect(function(player , currentart) if currentart == "SwingRight" and fighting == false then local anim = Instance.new("Animation") anim.AnimationId = "http://www.roblox.com/asset/?id=3249246694" local playAnim = humanoid:LoadAnimation(anim) playAnim:Play() fighting = true effect.Octave = 1 sound.TimePosition = 0 sound.Playing = true wait(0.6) fighting = false end
not full script
What should i do to fix that bug? (all the animations work)
You may try to play animations from client, since
humanoid:LoadAnimation(anim) should bypass filtering and replicate (in theory). Other than that, you may force animation priority to action, if by any chance is not that already:
local playAnim = humanoid:LoadAnimation(anim) playAnim.Priority = Enum.AnimationPriority.Action playAnim:Play()
I have had this problem many times before. I believe what you need to do is set the animations Priority in the Edit tab to "Idle" that should force the animation to play without any problems.