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.