Animation not working

Hello, Im trying to work on a script for a horror game where an NPC hides if you shine a light on them.

The hiding animation wont work, Can someone help me?

local Light = game.Workspace.Views.ViewRight.SpotLight
local Model = script.Parent
local Animation = Instance.new("Animation")

Animation.AnimationId = "rbxassetid://00000000" -- hidden ID

if Light.Enabled == false then 
	wait(5)
	Model:PivotTo(CFrame.new(-30.998, 8.786, -3.519))
		
	end


if Light.Enabled == true then 
	wait(5)
	Model:PivotTo(CFrame.new(-30.998, 8.786, -12.119))
	Animation:Play()
	
end

the animation will have to be loaded for the npc to play it. you can load the animation by using something along the lines of this

local AnimationTrack = humanoid:LoadAnimation(Animation)

and then you can play the animation by replacing all of your “Animation:Play()” lines with “AnimationTrack:Play()” and it should work fine

local Light = game.Workspace.Views.ViewRight.SpotLight
local Model = script.Parent
local Animation = Instance.new("Animation")

Animation.AnimationId = "rbxassetid://00000000" -- hidden ID

if not Light.Enabled then 
	wait(5)
	Model:PivotTo(CFrame.new(-30.998, 8.786, -3.519))	
end

if Light.Enabled then 
	wait(5)
	Model:PivotTo(CFrame.new(-30.998, 8.786, -12.119))
	Model.Humanoid.Animator:LoadAnimation(Animation):Play()
end