I am currently making a game with weapons and i have and idle animation for the tool but the script isnt working and i have no errors
heres my code
local tool = script.Parent
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/Asset?ID=9500984568" --Animation ID
local track
tool.Equipped:Connect(function()
track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = true
track:Play()
end)
tool.Unequipped:Connect(function()
if track then
track:Stop()
end
end)
I have looked around cant find anything i have changed the animation priotity to idle, action, and movement yet nothing is working
Why dont you loop it inside the animtion editor (assuming you use moon animator), and then access the idle animations located inside the ‘animate’ local script inside of the character, and change the idle animation from there when it is equipped?