Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

Make equip animation gun. How to make infinite time at the timeline?

Asked by 3 months ago

Hey guys, I'm a small roblox developper in learning. So, you know this animation to hold a gun?

For make the script, it's so really easy.

Tool.Equipped:Connect(function()
    animTrack = Humanoid:LoadAnimation(script.Parent.Hold)
    animTrack:Play()
end)

But when I create a animation, after the end of the animation the animation stopped. But how to make it infinite? I don't want use AnimationTrack.Speed or AnimationTrack:AdjustSpeed because it's not worked.

1 answer

Log in to vote
2
Answered by
incapaxx 2647 Badge of Merit Moderation Voter Community Moderator
3 months ago
Edited 3 months ago

In your animation settings set 'Looped' to true or from a script do it. The :LoadAnimation() function returns an AnimationTrack, and that has the Looped property.

AnimationTrack.Looped = true

Another possible issue could be that the priority is too low. The lowest priority is core, whilst the highest is action. A good priority for a holding animation for a tool is movement.

AnimationTrack.Priority = Enum.AnimationPriority.Movement

Or from the animation settings, you could do this as well.


Hopefully this answered your question, and if it did, then don't forget to hit that "Accept Answer" button, and optionally, give an upvote. It helps out a lot. If you have any other questions, then feel free to leave them down in the comments.
0
With the Priority set to movement the animation ended automatically NiniBlackJackQc 554 — 3mo
0
Maybe don't touch the priority property, and try the looped. Maybe priority messed it up incapaxx 2647 — 3mo
Ad

Answer this question