I don't really know how to explain this, but I'll try my best. Basically, I have an animation I'm currently working on;
local player = game.Players.LocalPlayer
repeat wait() until player.Character
local character = player.Character
local debounce = false
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://2983973572"
local track = character:FindFirstChild("Humanoid"):LoadAnimation(animation)
local UIS = game:GetService("UserInputService")
UIS.InputBegan:connect(function(input,proc)
if not proc then
if input.KeyCode == Enum.KeyCode.R and debounce == false then
debounce = true
track:Play()
elseif input.KeyCode == Enum.KeyCode.R and debounce == true then
debounce = false
track:Play()
end
end
end)
(Now is it just me or does copy pasta not work with the codeblocks here?)
The animation played is just a simple movement of the left arm, but I want it to continue playing until the key is pressed again. However if I idle, jump, move, climb, get hurt, etc. it stops the animation. I've searched everywhere but I don't know how to word it to find it.
Thanks in advance for the help!

2 comments
Thanks a lot for this, I had already changed the code to track:Stop() but I just didn't have the Priority set right, thanks a million, for such a simple answer to haha!
Happy this helped!