How can you make the idle,run and main animations for tool appear and disappear directly?

hello,
so i want my tool animations like run and idle appear and disappear directly, i tried to use ApplyDescription but the animations didnt go directly to the player
like this video:
https://gyazo.com/c643e9bee6d4db9ece1f57365faaf588.mp4

this is the script

local sword = script.Parent

sword.Equipped:Connect(function()
	local character = sword.Parent
	humanoid = sword.Parent:WaitForChild("Humanoid")
	description = humanoid:GetAppliedDescription()
	local descriptionClone = description:Clone()

	descriptionClone.IdleAnimation = 16449913426
	humanoid:ApplyDescription(descriptionClone)
end)


sword.Unequipped:Connect(function()
	if humanoid and description then
		humanoid:ApplyDescription(description)
	end
end)

i did search and find nothing
any solutions?

1 Like

I believe you use loadanimation instead and then you can just play the animation directly and stop it if needed.

the animations that are loaded via HumanoidDescriptions are intended to be from R15Anim packages, not developer animations. they’re basically for bundles or custom-made stuff like that, which is why this isn’t working. to do custom animations, use :LoadAnimation() from the Animator inside the humanoid object in the character

but if i use :LoadAnimation() i should detect the player movment all time
that will be a heavy function for player to run it all time
any other way? or does it reduce performance?

1 Like

theres events for humanoid states, check the API doc for events under Humanoid

ok i will try to do a script like this