Animation isn't playing at all (in the rig/AI)

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

  1. What do you want to achieve? I want to make the rig to play an animation (attack).

  2. What is the issue? The animation doesn’t play at all.

  3. What solutions have you tried so far? I’ve looked for solutions in the Developer Forum but didn’t find any.

	local bossTool = bossModel:WaitForChild(BossInData:FindFirstChild("SwordNameValue").Value)
	local Humanoid = bossModel:WaitForChild("Humanoid")
	local Animator = Humanoid:WaitForChild("Animator")
	
	local AttackAnimationID = 16421461996
	local AttackAnimation
	
	if not Humanoid:FindFirstChildOfClass("Animation") then
		AttackAnimation = Instance.new("Animation", Humanoid)
		AttackAnimation.Name = "AttackAnimation"
		AttackAnimation.AnimationId = "rbxassetid://" .. AttackAnimationID
	end
        
	AttackAnimation = Humanoid:FindFirstChildOfClass("Animation")
	
	local AttackAnimationTrack = Animator:LoadAnimation(AttackAnimation)
	local previousActivationTime = 0
	local cooldown = false


	while wait(1.2) do
		if AttackAnimationTrack and not cooldown then
			local currentTime = tick()
			local timeDifference = currentTime - previousActivationTime
			local speedIncrement = 3.2
			local totalSpeed = speedIncrement + (1 / (timeDifference + 0.1))
			
			print(totalSpeed)
			
			AttackAnimationTrack:Play(0.1, 1, totalSpeed)
			cooldown = true
			previousActivationTime = currentTime
		end
		AttackAnimationTrack.Stopped:Wait()
		cooldown = false
	end

It’s in Server side btw

1 Like

Make sure your rig is unanchored. Does the output say anything?

Nvm. I’ve found out that I didn’t have R15 rig while the animation is R15.

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