Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does the animations keeps stopping?

Asked by 5 years 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 = 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)

2 answers

Log in to vote
1
Answered by
sleazel 1287 Moderation Voter
5 years 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
playAnim:Play()

Ad
Log in to vote
1
Answered by 5 years 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