Animation not reversing(no error)

  1. What do you want to achieve?
    I’m making an animation for a weapon
  2. What is the issue?
    So when the animation fires, it doesn’t reverse and stays in the final pose of the animation
  3. What solutions have you tried so far?
    I tried changing the animation priority(right now it’s in action mode) and turning on the animation loop thing.
    Image of the animation(r15) here:
tool = script.Parent
debounce = nil
local character = nil
local waitingTime = false	
function Attack()
	if debounce == nil and waitingTime == false then
		waitingTime = true
		character = script.Parent.Parent 
		local anim 
		local humanoid = character:WaitForChild("Humanoid")
		local animTrack
		if character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
			 anim = tool:WaitForChild("R15_ANIM")
			humanoid = character:WaitForChild("Humanoid")
			 animTrack = humanoid:LoadAnimation(anim)
		else
			anim = tool:WaitForChild("R6_ANIM")
			humanoid = character:WaitForChild("Humanoid")
			animTrack = humanoid:LoadAnimation(anim)
			
		end

		
		animTrack:Play()
		debounce = true
		tool.Handle.Sound:Play()
		wait(0.9)
		debounce = nil
		
		wait(4)
		waitingTime = false
		tool.Handle["Radio Beep"]:Play()
	end
end

tool.Activated:Connect(Attack)

tool.Handle.Blade.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player and debounce == true then
		debounce = nil
		local hum = player.Character:WaitForChild("Humanoid")
		hum.WalkSpeed = 0
		hum.JumpHeight = 0
		hum.AutoRotate = false
		hum:TakeDamage(20)
		wait(2)
	end
end)

robloxapp-20240310-0833031.wmv (2.1 MB)
Also here is the video so u can see the error clearly :slight_smile:

I believe the problem is the fact that you have the animation looped. meaning itll just play on forever
Go back to your animation editor, turn off looping, publish and overwrite the corresponding animation

I turned it off and it still doesn’t reverse like in the video :frowning: maybe its because it’s played on a normal script instead of a local one?

idk how it now works so thanks

**characters **

Glad I could help…I think?
Probably because animation took time to update with roblox’s servers

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