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

How do I make my animations play over character animations?

Asked by
ax_gold 360 Moderation Voter
4 years ago

I have a script that plays a punch animation whenever a RemoteEvent is Fired. The animation plays, but whenever I move my character, the animation is overwritten by the character's movement animations. Here's my code:

local Animations = game:GetService("ReplicatedStorage").Animations

game:GetService("ReplicatedStorage").MainEvent.OnServerEvent:Connect(function(plr,attack)
    local char = plr.Character
    if(attack=="Punch")then
        local anim = char.Humanoid:LoadAnimation(Animations.Punch)
        anim.Priority = Enum.AnimationPriority.Action
        anim:Play()
    end
end)

Does anyone know how I can prevent character animations from stopping my animation?

1
I would suggest going back to the animation in whatever editor you used to make it (Default, Moon, Blender), and setting the priority to action directly from there. climethestair 1663 — 4y
0
Thanks, that fixed my issue! I didn't even know there was a priority setting in the editor! ax_gold 360 — 4y

Answer this question