So I’ve been trying to set up an animation that plays when you step over a part. I am 100% sure that the code itself works, but this leads me to my issue
I have the animation as a member of the script. The problem is that any action done by the player such as jumping or even walking stops the animation that I’m trying to have the player do.
Here’s my code:
local Axe = script.Parent.BasicAxe
script.Parent.Touched:connect(function(hit)
local Parent = hit.Parent
if game.Players:GetPlayerFromCharacter(Parent) then
local Anim = script:WaitForChild("Animation")
local Humanoid = Parent.Humanoid
local DoAnim = Humanoid:LoadAnimation(Anim)
DoAnim.Priority = Enum.AnimationPriority.Action
DoAnim.Looped = true
DoAnim:Play()
end
end)
Here’s what happens:
https://gyazo.com/f8cf2699c8241386174a0c58d4bcd7c6
(You can slightly see the animation play at the beginning, but when I stop walking, it stops)
Any ideas to why the Action Priority is being overridden by the default animations?