Animation Doesnt Play when tool Activated

Script

local Apple = script.Parent

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local Humanoid = char:WaitForChild("Humanoid")
local Animator = Instance.new("Animator")
Animator.Parent = Humanoid
local EatingAnim = Instance.new("Animation")
EatingAnim.AnimationId = 8997375473
EatingAnim.Parent = player

Apple.Activated:Connect(function(Eating)
	if Eating then
		local EatingAnimTrack = Animator:LoadAnimation(EatingAnim)
		EatingAnim.Priority = Enum.AnimationPriority.Action
		wait(.1)
		EatingAnimTrack:Play()
		wait(.1)
		Apple:Destroy()
		print("Done!")
	end
end)

My Animation Doesnt Play and there are no Errors!

1 Like

remove if eating then and it will probaly work

new error
15:25:11.137 Invalid animation id ‘<error: unknown AssetId protocol>’: - Client - LocalScript:13

EatingAnim.AnimationId = "rbxassetid://8997375473"

maybe this would work? (or maybe it’s the humanoid? after doing some digging I saw someone say that it was a problem with their humanoid)

Is activating even working? I’ve had some trouble with it not running in the past.