I tried to play animation but script is broken now how can make view model do play an animation
Heres script.

local ViewModel = game.ReplicatedStorage.ViewModel:Clone()
local hum = ViewModel:WaitForChild("Humanoid")
local anim = hum:LoadAnimation(ViewModel.Equip)
RunService.RenderStepped:Connect(function()
if Player.Character.Humanoid.Health == 0 then
if Camera:FindFirstChild("ViewModel")~=nil then
Camera.ViewModel:Destroy()
end
end
if Camera:FindFirstChild("ViewModel")~=nil then
Camera:WaitForChild("ViewModel"):SetPrimaryPartCFrame(Camera.CFrame * CFrame.new(0.1, -2.5, -1) * CFrame.Angles(0.05, 0,0))
end
Character:FindFirstChild("KitsuneKatanaFE").Equipped:Connect(function()
anim:Play()
end)