Not Loading the Second Animation

You can write your topic however you want, but you need to answer these questions:

  1. trying to make it play the second animation

  2. The Current issue is it isn’t loading the second animation

  3. I tried fixing it but then it just breaks

-- local player = game.Players.LocalPlayer
local Character = player.Character
local Mouse = player:GetMouse()
local UIS = game:GetService("UserInputService")
-----------------------------------------------
local CurrentTime = 0
local PastTime = 0
local Count = 0

UIS.InputBegan:Connect(function(Input,IsTypin)
	if IsTypin then
		return
	end
	
	if Input.UserInputType == Enum.UserInputType.MouseButton1 then
		CurrentTime = tick()
		PastTime = CurrentTime - PastTime
		-----------------------------------
		if PastTime < 1 then
			--------- Can still do the combo
			Count = Count + 1
			
			-------------------------------
			if Count > 2 then
				Count = 0
			end
		else
			--------- Retart the combo
			Count = 0
		end
		
		
		
		local Anims = {
			game.ReplicatedStorage.LeftPunch,
			game.ReplicatedStorage.RightPunch
}
		for _,v in pairs(Anims) do
			local LoadAnimation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(v,(Count))
			LoadAnimation:Play()
		end
	end
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

Most likely this is the issue, as Humanoid:LoadAnimation() is deprecated. Use the Animator instance instead.

2 Likes

change it to this:

local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")

local LoadAnimation = animator:LoadAnimation(v,(Count))

I tried that before I posted this it still only does the first animation