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

Why doesn't tool animation play even at the high priority?

Asked by 4 years ago
local Gun = script.Parent
local Hold = Gun:WaitForChild("Hold")
local Sprint = Gun:WaitForChild("Sprint")
local Reload = Gun:WaitForChild("Reload")
local Crouch = Gun:WaitForChild("Crouch")


Gun.Equipped:Connect(function(part)
    print("equip")
    local humanoid = Gun.Parent:WaitForChild("Humanoid")
    print(humanoid.Parent)
    print(Hold.Parent)
    local HoldTrack = humanoid:LoadAnimation(Hold)
    HoldTrack.Priority = Enum.AnimationPriority.Action
    HoldTrack:Play()
    print(HoldTrack.Priority)
end)

Here, no errors are printed. I've tried to set priority to highest, and also checked with the last print in the function that it is set to Action. I'm trying to get Hold animation to play while the player is holding the tool. Help appreciated, thanks!

0
Priorities sometimes are not set by scripts (idk why, i had this issue before too), try setting the priority to action in the animation editor, that might help, oilkas 364 — 4y

Answer this question