This is the code: local player = game.Players.LocalPlayer local mouse = player:GetMouse() local Animate local Humanoid = player.Character:FindFirstChild('Humanoid')
mouse.KeyDown:Connect(function(Key)
if Key == "c" then
local Animation = Instance.new("Animation", player.Character)
Animation.AnimationId = "rbxassetid://11900611628"
Animate = Humanoid:LoadAnimation(Animation)
Animate:Play()
wait(5)
end
end)
mouse.KeyUp:Connect(function(Key) if Key == "c" then Animate:Stop() end end). Yes I took it from YT
This is sometimes not a problem with ur code, the animation priorty is the one u need to worry about. Try setting the animation priorty to core or movement. If ur wondering where that is.. Open ur animation editor. and find it.