So basically in this script you have to press 2 keys to run a certain animation "W and A". However pressing W runs another animation(in another script) so whenever a player stops holding down A the animation for pressing "W and A" still plays instead of going back to the animation when W is being held down.
Script:
local p = game.Players.LocalPlayer local anim = script.Animation local serv = game:GetService("UserInputService") local keyCodeW = Enum.KeyCode.W local keyCodeA = Enum.KeyCode.A local char = p.Character if not p.Character then repeat wait() until p.Character end local human = char:WaitForChild("Humanoid") wait(1) local newAnim = human:LoadAnimation(anim) serv.InputBegan:Connect(function(key,processed) if serv:IsKeyDown(keyCodeW) and serv:IsKeyDown(keyCodeA) then print("Starting animation!") newAnim:Play() end end) serv.InputEnded:Connect(function(key,processed) if not serv:IsKeyDown(keyCodeW) then newAnim:Stop() end end)