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

Is it possible to stop a looped animation?

I tried to put animation.Looped = false but that didnt work. the loop part works but then making it false doesnt. And its meant to be looped

while wait() do
	animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Anim.Animation)
	if script.Parent.AnimationEnable.Value == true then
	animation.Looped = true
	animation:Play()
	end
	
	if script.Parent.AnimationEnable.Value == false then
	animation.Looped = false
	animation:Stop()
	end
end

1 answer

(I'm assuming you didn't loop your animation when you made it) Make the animation looped before exporting it, then simply do animation:Play() when you want it to play and animation:Stop() when you want it to stop.

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