Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to use Stopped() for Animation Tracks?

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.

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)

1 comment

0

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

This discussion is preserved as it was. New answers, comments, and votes are closed.