local airHit = {
"rbxassetid://13305219902", -- AIR UP
"rbxassetid://13305215113", -- AIR DOWN
}
local animation = Instance.new("Animation", workspace.Fx)
local hitAnimation = Instance.new("Animation", workspace.Fx)
local air = nil
if UIS:IsKeyDown(Enum.KeyCode.Space) and combo == 3 and canAir then
canAir = false
animation.AnimationId = airAnims[1]
hitAnimation.AnimationId = airHit[1]
air = "Up"
elseif UIS:IsKeyDown(Enum.KeyCode.Space) and combo == 5 and not canAir then
animation.AnimationId = airAnims[2]
hitAnimation.AnimationId = airHit[2]
air = "Down"
elseif not UIS:IsKeyDown(Enum.KeyCode.Space) and combo == 5 and not canAir then
animation.AnimationId = airAnims[2]
hitAnimation.AnimationId = airHit[2]
air = "Down"
else
animation.AnimationId = basicAnims[combo]
hitAnimation.AnimationId = basicHit[hit]
end
local function OnTouched(otherPart)
if otherPart.Name == "Head" or "Torso" and otherPart.Parent:FindFirstChild("Humanoid") ~= nil and inCombat.Value == true then
local currentTarget = otherPart.Parent:FindFirstChild("Humanoid")
local loadHit = currentTarget:LoadAnimation(hitAnimation)
loadHit:Play()
else
return
end
end
humanoid.Touched:Connect(OnTouched)
local load = humanoid:LoadAnimation(animation)
load:Play()
animation:Destroy()
hitAnimation:Destroy()
So here I have a script that when you toss the enemy in the air plays his animation, but for some reason it is not. And the player himself has that is airAnims, works, but the airHit does not.
The output does not have any errors, it is a local script that is at the tool.
All animation is R6