local airHit = {
"rbxassetid://13305219902", -- AIR UP
"rbxassetid://13305215113", -- AIR DOWN
}
local function airUp()
local currentTarget: Humanoid = nil
local function OnTouched(otherPart)
if otherPart.Name == "Head" or "Torso" and otherPart.Parent:FindFirstChild("Humanoid") ~= nil and inCombat.Value == true then
currentTarget = otherPart.Parent:FindFirstChild("Humanoid")
end
end
humanoid.Touched:Connect(OnTouched)
local hitAnimation = Instance.new("Animation")
hitAnimation.AnimationId = airHit[1]
print(hitAnimation)
local currentTarget = currentTarget
print(currentTarget)
local loadHit = currentTarget:LoadAnimation(hitAnimation)
wait(1)
loadHit:Play()
print(loadHit)
end
So here I have a script that plays the animation in the enemy, it if anything is activated, I just did not see the point in showing you part of the script activation.
So this is the script you play the animation in the enemy, but for some reason there is such an error: