This is my script, it works fine but the animations is a bit weird...
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=1491234078" -- id of animation mouse.KeyDown:connect(function(key) if key == "z" then --Select a button, if you want shift then put 48 in it local playAnim = humanoid:LoadAnimation(anim) playAnim:Play() end end)
THIS IS THE PROBLEM, the animation plays only in one direction, how do i make it play in the direction you face in... and also, how do i make the animation stop when you hit the ground is there a way to make this"? does the animation need some kind of werd stuff??
When you created the animation you must have used world space instead of local and as for stopping it there is a priority property on the KeyKrameSequence. What your looking for is idle i believe.
Core (lowest priority) Idle Movement Action (highest priority)
So you most likely need to remake the whole animation or load it and change it as necessary.