Animation not playing no matter what

I am making a game where players utilize swords as weapons on one of the maps. I am trying to animate sword slashes, but I have been left confused as to why it has not worked.
I am able to load and play the animation, and I can prove this by creating a print statement when the animation is confirmed to be in progress. However, it does not show on the avatar in any circumstance. I have tried using animators, humanoids, humanoid animators, animator humanoids, and basically everything I could find. Here is the script:

script.Parent.Activated:Connect(function()
	local anim = script.Slash
	local animator = script.Parent.Parent:FindFirstChild("Humanoid").Animator
	local track = animator:LoadAnimation(anim)
	track.Priority = Enum.AnimationPriority.Action
	track:Play()
	if track.IsPlaying then
		print("a")
	end
end)

Thanks in advance.

what do you mean by this?, are you trying to say it is playing locally and not server sided?

Not playing at all. I am currently investigating something right now though, as I noticed my animation was made for R6 models and not R15 models. I am recreating it and testing it to see if it works. I’ll update this post if it is solved.

The animation being R6 must be the problem, I tested your code with my own sword animation and it seems to work fine.

1 Like

Fixed, just needed to convert the R6 animation to R15 to be compatible with my game. Works fine now.

1 Like