How can I add an Idle animation?

So I figured out how to add an idle animation the other day. However, it was it’s own script, and when I used it, the swing animation would barely play, I’m not sure why at all. It will just barely move. If there is a way to fix that or even add an idle animation via this script, which is also used for the swing animation, please let me know. Thank you.

local player = game.Players.LocalPlayer
repeat wait() until player.Character
local Character = player.Character
local Humanoid = Character.Humanoid

local cooldown = false

local animation = script.Parent.Swing

script.Parent.Activated:Connect(function()
	if cooldown == false then
		cooldown = true
		local LoadedAnimation = Humanoid:LoadAnimation(animation)
		LoadedAnimation:Play()
		script.Parent.SwingEvent:FireServer()
		wait(1)
		cooldown = false
	end
end)

Lower the animation priority of the idle animation so that your swing animation supercedes it. You could just set the animation priority to be Idle too

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