How to make idle animation play immediately after changing

local userInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer


userInputService.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.Q then
		player.Character.Animate.idle.Animation2.AnimationId = "rbxassetid://6964769377"
		player.Character.Animate.idle.Animation1.AnimationId = "rbxassetid://6964769377"
		print("Q was pressed")
	end
end)

userInputService.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.E then
		player.Character.Animate.idle.Animation2.AnimationId = "rbxassetid://6802906860"
		player.Character.Animate.idle.Animation1.AnimationId = "rbxassetid://6802906860"
		print("E was pressed")
	end
end)


So the code up there changes my idle animation successfully, however the effect only takes place after I move a character a little, does anyone know how to make the idle animation play immediately after it changes? ( I included a video to show the issue)

Please reference this post. If it doesn’t work, hit me back up

nope i just tried it and it still persists.
I even tried making the first idle animation a core priority temporarily and see if it would stop playing and let the second idle animation take over. but it still didn’t work.