How do i pause animation at last frame?


i want to stop exactly there

my code:

flowerTrack:Play()
task.wait(flowerTrack.Length * 0.99)
flowerTrack:AdjustSpeed(0)

I wouldn’t use task.wait, I’d add an event at the last frame (you can adjust the frames per second on the animation editor by clicking on the settings icon on the top right). I think you add the event by right clicking on the frame you want it at. Then the event will fire when the animation reaches that part.

flowerTrack:GetMarkerReachedSignal("AlmostEnd"):Connect(function()
          flowerTrack:AdjustSpeed(0)
end

Btw “AlmostEnd” is the name of the event, you can set it when creating the event in the animation editor. Hope this helps.

Try this:

flowerTrack:Play()

flowerTrack.Stopped:Connect(function()
flowerTrack:AdjustSpeed(0)
end)