What do you want to achieve?
I’m making an animation for a weapon
What is the issue?
So when the animation fires, it doesn’t reverse and stays in the final pose of the animation
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)
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