How to change idle animation instantly?

so im making a tool, that tool changes your idle. but after changing it, you have to move to apply(?) it. how can i make it instanly change? i tried changing states but changgn states wasnt really a good thing beacuse if you change the state to something random like swimming, character stays at air for a ms.

2 Likes

Are you modifying the Animate local script of Player Character? Like modifying the Animate.idle.Animation1?

If so then you can copy the Animate local script from your character then paste it into your StarterCharacterScripts like this:
image

Then you modify it by putting this

script.idle.Animation1.Changed:Connect(function()
	stopAllAnimations()
	playAnimation("idle", 0.2, Humanoid)
	pose = "Standing"
end)

between function playAnimaton (line 507) and function playEmote (line 515)

Apologies, the code above will change the idle even when they are moving, put this instead:

script.idle.Animation1.Changed:Connect(function()
	if pose == "Standing" then -- make sure the player is standing, not running or swimming, etc...
		stopAllAnimations()
		playAnimation("idle", 0.2, Humanoid) -- you can increase the '0.2' to make the idle transition faster
	end
end)
3 Likes

bro just delete current animation script and replace it with a new script that has new anim ids inside no need for events inside

thats a really bad but working solution. however guest4666 find an better solution to me!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.