Animation not playing

i wanted to make an animation for an attack, however the animation inst playing. Does anyone know if i did something wrong?

local script:

local UserInputService = game:getService(“UserInputService”)
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local tool = script.Parent

local debounce = false
UserInputService.InputBegan:Connect(function(Input, IsTyping)
if not IsTyping then
if not debounce then
if tool.Enabled == true then
if Input.KeyCode == Enum.KeyCode.E then
local chr = player.Character
local human = chr.Humanoid
local tool = script.Parent
local anim = human:LoadAnimation(tool.KiQuick)
game.ReplicatedStorage.KiBlast:FireServer()
anim:Play(1,0)
end
wait(1)
debounce = false
end

	end
end

end)

LoadAnimation has been deprecated. Consider using the newer method (via the Animator) instead.

1 Like

Consider this for more details on the deprecation.

1 Like

could you elaborate if possible? how do i use this "animator? any tutorials?

Apologies, consider this topic: Deprecating LoadAnimation on Humanoid and AnimationController

1 Like

Just because it’s deprecated that doesn’t mean Humanoid:LoadAnimation() won’t work.

There’s likely some other issue at hand, like animation ownership.