-
What do you want to achieve?
I want to play an attack animation for my stick. -
What is the issue?
The animation doesn’t play at all -
What solutions have you tried so far?
I have saved my game to roblox, I have changed the animation priority to Action and Action 3 and I also tried to look for solutions in the DevForum, but couldn’t find a solution.
I was creating a stick for hitting enemies, but the animation doesn’t load. When I test it, it does print "Animation played"
, but it doesn’t actually play it, and I don’t know what to do.
This is the code block with the issue (It’s in a LocalScript btw):
-- Loads and plays an animation
local function PlayAnimation(Animator: Animator)
if not Animator then
return
end
local Track = Animator:LoadAnimation(Animation)
Track.Priority = Enum.AnimationPriority.Action3
Track:Play()
print("Animation played")
task.wait(Track.Length + Cooldown)
end
Please help me, I’d appreciate it a lot