local player = game.Players.LocalPlayer repeat wait() until player.Character.Humanoid local humanoid = player.Character.Humanoid local mouse = player:GetMouse()
local anim = Instance.new("Animation") anim.AnimationId = "http://www.roblox.com/asset/?id=(animationid)"
mouse.KeyDown:connect(function(key) if key == "r" then local playAnim = humanoid:LoadAnimation(anim) playAnim:Play() game:GetService("StarterGui"):SetCore("ResetButtonCallback", false) game.StarterPlayer.EnableMouseLockOption = false game.StarterPlayer.AutoJumpEnabled = false game. wait(3.2) game:GetService("StarterGui"):SetCore("ResetButtonCallback", true) game.StarterPlayer.EnableMouseLockOption = true game.StarterPlayer.AutoJumpEnabled = true end end)
It plays the animation, but Roblox, when you are not moving, plays an idle animation, and that idle animation makes the animation stop, and then plays the idle animation.
So everytime Roblox plays an idle animation, the animation stops. How do I fix this?
(And the id=(animationid) is my animation id. )

4 comments
So, all I would have to do is re-upload the animation with a higher priority? :D
Alternatively you can just change the Priority in the AnimationTrack. But yes that will also work
So with my animation button, what is a way I could make it so the first hit of the "R" button plays the animation, but the second makes it stop?
It would be better if you asked a separate question, it will be rather difficult to answerin the the comments. Aside from that you could store a variable and increment the variable and if the variable is a certain value you do a different action.