I have an idle animation playing on the player when a tool is equipped. The issue is that it also overrides any other movement animations like running or jumping.
I want to make it so the idle animation still plays, but does not overwrite stuff like running or jumping.
How could I do this?
Script:
local tool = script.Parent
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/Asset?ID=AnimationID" -- Replaced ID
local track
tool.Equipped:Connect(function()
track = script.Parent.Parent.Humanoid.Animator:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = true
track:Play()
end)
tool.Unequipped:Connect(function()
if track then
track:Stop()
end
end)