Animation not playing

There is no errors. What could be the cause? Any help?


game.ReplicatedStorage.Detain.OnServerEvent:Connect(function(plr, part)
	print("got")
	
	local playthingy = part.Parent.Name
	local playah = game.Players:WaitForChild(playthingy)
	local char = playah.Character
	local hum = char:WaitForChild("Humanoid")

	local anim = Instance.new("Animation")
	anim.AnimationId = "rbxassetid://7369895946"
	local track = hum:LoadAnimation(anim)
	track.Priority = Enum.AnimationPriority.Action
	track:Play()
	print("played")
	
	
end)

Thanks.

Use the player’s Animator, located in Character > Humanoid > Animator.

local AnimationTrack = game.Players.LocalPlayers.Humanoid.Animator:LoadAnimation(Animation)

Loading the animation on the humanoid is deprecated.

Still not playing. I think deprecated is just it wont get any more updates.