Help with stopping a looped anim

I have a Knocked system where if you get low you get knocked, the anim plays but it wont stop. Any help?

	local function PlayAnim(ValueV)
		local Anim = Char.Humanoid:LoadAnimation(script.Animation)
		if ValueV == true then
			Anim:Play()
		else
				print("ISPLAYING")
				Anim:Stop()
		end
	end

1 Like

This might be because you’re creating an AnimationTrack every time you execute function PlayAnim so the script is stopping a separately created animation from the one currently playing. Try loading the animation beforehand.

1 Like

I tried putting it out of the function and the same thing happened

1 Like

I The Video You Have Posted, You Have PlayAnim Function Inside Of Another Function, Can You Post Your Whole KnockDetect Script, So I Can Understand Whats Going On!

1 Like

I dont know why it didnt work but I changed the anim to play and stop in a localscript and it worked.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.