Roblox Animation Not Playing

Hey, I’m Developer Fox.

Right now, the problem I am currently having is that my tool animations won’t work, and I’m considering that it may either be the player tool animation or the script itself, I’ll include the script below

local character = game:GetService("Players").LocalPlayer.Character
local tool = script.Parent
local animation = tool:WaitForChild("Animation")
local animationTrack = character.Humanoid:LoadAnimation(animation)

local canRun = true
local debounceTime = 1

tool.Activated:Connect(function()
	if canRun then
		canRun = false
		animationTrack:Play()

		wait(debounceTime)
		canRun = true
	end
end)

(yes, this was a copy-pasted script with additional changes)

I have tried multiple ways on the script, but just about every time, it will stay in the same pose or form of character. I’ve watched videos and gone through some forums, but none have worked so far

ScriptScreensot

The item is cloned and then put into the player’s backpack from Replicated Storage

AnimationId: rbxassetid://114755488394883

(please note that this was R6)

Is there any way this script wouldn’t be running? Try putting a print statement into the Activated part

Try This:

local character = game:GetService("Players").LocalPlayer.Character
local tool = script.Parent
local animation = Instance.new("Animation")
local animationTrack = character.Humanoid:LoadAnimation(animation)
animationTrack.Priority = Enum.AnimationPriority.Action2

local canRun = true
local debounceTime = 1

tool.Activated:Connect(function()
	if canRun then
		canRun = false
		animationTrack:Play()

		wait(debounceTime)
		canRun = true
	end
end)

It May be the priority of the animation.

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local tool = script.Parent
local animation = tool:WaitForChild("Animation")
local animationTrack = character.Humanoid:LoadAnimation(animation)
animationTrack.Priority = Enum.AnimationPriority.Action2

local canRun = true
local debounceTime = 1

tool.Activated:Connect(function()
	if canRun then
		canRun = false
		animationTrack:Play()

		wait(debounceTime)
		canRun = true
	end
end)

I did some debugging with this