So I had been trying to play an animation for a couple of minutes now and it just ain’t working. I know for a fact that the code executes that part, for the print statements work flawlessly.
Also, I own the animations, and they r in this form "rbxassetid://ID"
local humanoid : Humanoid = self.Player.Character:FindFirstChild("Humanoid")
local animator : Animator = humanoid:FindFirstChildOfClass("Animator")
local animation = Instance.new("Animation")
animation.AnimationId = animationID
print(animation, animationID)
local animationTrack : AnimationTrack = animator:LoadAnimation(animation)
animationTrack:Play()
self.Janitor:Add(animationTrack.Stopped:Connect(function()
self:SetState("Idle")
end))
Also when I was debugging I found out that, Janitor
fires stopped really quick, like 0.4 secs, so I checked the length of the track and would u look at that? 0.4 seconds. I don’t know if that’s necessary time period for an animation to run, if not pls lmk.