Solution found:
Fixed Script:
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=5628191355"
mouse.KeyDown:connect(function(key)
if key == "e" then
if humanoid.Jump == false then
humanoid.Parent.Animate.Disabled = true
humanoid.Jump = true
local playAnim = humanoid:LoadAnimation(anim)
playAnim:Play()
wait(playAnim.Length)
humanoid.Parent.Animate.Disabled = false
end
end
end)
Hi! So, basically, I am trying to make acrobatic animations such as flips and stuff. I have currently finished my first animation and a keybind animation script. Yet it doesn’t work when you are in the air, and that’s essentially the point of it really baha. I’m assuming it’s because the fall animation is overriding the animation but I was wondering if there was anyway to cancel the fall animation?
This is the local script inside of StartPlayerScripts that plays the animation:
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=5628191355"
mouse.KeyDown:connect(function(key)
if key == "e" then
if humanoid.Jump == false then
humanoid.Jump = true
local playAnim = humanoid:LoadAnimation(anim)
playAnim:Play()
end
end
end)
Is there any way to cancel all animations before one animation is complete?