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

Animation doesn't loop when tool is equipped?

Asked by 4 years ago

My animation doesn't loop on idle when the tool is equipped. I don't know why because I've set it on the highest priority of Action, but after 2 - 4 seconds it goes back to its default animation after being equipped.

Heres my code:

local tool = script.Parent
local Animations = script.Parent.Animations

tool.Equipped:Connect(function()
    local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Animations.SwordIdle)
    animation:Play()
end)



1 answer

Log in to vote
0
Answered by
DollorLua 235 Moderation Voter
4 years ago

In the animation editor when creating your animation there is a button called "Loop" check that to on and it should loop then when you un equip the tool do animation:Stop()

0
Thanks for the help. RebornedInFire 35 — 4y
0
Now the animation wont stop, any ideas on how to fix that? RebornedInFire 35 — 4y
0
He said when the player un-equips the tool, do animation:Stop() XviperIink 428 — 4y
Ad

Answer this question