Basically i have a on Key press animation script. But the only problem is that the animation still plays even when im not clicking the button anymore.
I even made a new script with input service and it still doesen't work
--and get the player and character and humanoid local player = game:GetService("Players").LocalPlayer local character = player.Character or player.Character:Added() local humanoid = character:WaitForChild("Humanoid") --Next we make our animation local anim = Instance.new("Animation") anim.AnimationId = "rbxassetid://1297032259" --Now we can make a function to play animations! function playAnimation(Anim) local track = humanoid:LoadAnimation(Anim) track:Play() end --Now we play it when using the userinputservice game:GetService("UserInputService").InputBegan:connect(function(input ,proc) if not proc then if input.KeyCode == Enum.KeyCode.D then --get the F key using Enum playAnimation(anim) --plays our animation using our function :) end end end)