I'm confused on how to use the stopped() event for animation tracks. Whenever I try to use it, the output says stopped is a userdata value.
✓ ANSWER ACCEPTED
How to use Stopped() for Animation Tracks?
1 answer
✓ Accepted answer
local plr = game:GetService("Players").LocalPlayer
local plr = plr.Character or plr.CharacterAdded:Wait()
local anim = Instance.new("Animation")
anim.Parent = plr.Character
anim.AnimationId = "somethingHere"
local track = plr.Character.Humanoid:LoadAnimation(anim)
track:Play()
track.Stopped:Connect(function()
--do code
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
i meant "local char" in the second line but whatever