New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

Why does the animations keeps stopping?

Asked by 4 months ago

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 ="Animation")
        anim.AnimationId = ""
        local playAnim = humanoid:LoadAnimation(anim)
        fighting = true
        effect.Octave = 1
        sound.TimePosition = 0
        sound.Playing = true
        fighting = false

not full script

What should i do to fix that bug? (all the animations work)

2 answers

Log in to vote
Answered by
sleazel 679 Moderation Voter
4 months ago

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

Log in to vote
Answered by 4 months ago

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.

Answer this question