#Animation Blending

1 messages · Page 1 of 1 (latest)

vivid spear
#

For some reason, the animation keeps blending despite 1. The animation it blends into is stopped and 2. The animation it blends into has weight set to 0

#
    local Index = ("Attack" .. AttackValue)
    local Animation = Animations[Index]
    local IdleIndex = ("Idle" .. AttackValue)
    local IdleAnimation = Animations[IdleIndex]
    
    Animation:AdjustWeight(1)
    IdleAnimation:AdjustWeight(0)
    
    Cooldown = true
    Animation:play()
    Animation.Stopped:Wait()
    Cooldown = false
    
    IdleAnimation:play()
    isStance = true
    task.wait(1)
    isStance = false
    
    
end


local function Attack(AnimationValue)
    
    local Animations = {
        ["Attack1"] = Humanoid:WaitForChild("Animator"):LoadAnimation(game.ReplicatedStorage:WaitForChild("Animations"):WaitForChild("Melee Items"):WaitForChild(AnimationValue):FindFirstChild("Attack1")),
        ["Attack2"] = Humanoid:WaitForChild("Animator"):LoadAnimation(game.ReplicatedStorage:WaitForChild("Animations"):WaitForChild("Melee Items"):WaitForChild(AnimationValue):FindFirstChild("Attack2")),
        ["Attack3"] = Humanoid:WaitForChild("Animator"):LoadAnimation(game.ReplicatedStorage:WaitForChild("Animations"):WaitForChild("Melee Items"):WaitForChild(AnimationValue):FindFirstChild("Attack3")),
        ["Idle1"] = Humanoid:WaitForChild("Animator"):LoadAnimation(game.ReplicatedStorage:WaitForChild("Animations"):WaitForChild("Melee Items"):WaitForChild(AnimationValue):FindFirstChild("Idle1")),
        ["Idle2"] = Humanoid:WaitForChild("Animator"):LoadAnimation(game.ReplicatedStorage:WaitForChild("Animations"):WaitForChild("Melee Items"):WaitForChild(AnimationValue):FindFirstChild("Idle2"))
    }
    

    Animations["Idle1"]:Stop()
    Animations["Idle2"]:Stop()
    
    if AttackValue < 3 and isStance == true then
        AttackValue +=1
    else
        AttackValue = 1
    end
    
    PlayAttack(AttackValue, Animations)
    

    
    
end

white wasp
#

are you stopping the previous swing animation?

vivid spear
#

It goes like this
First Swing animation
Wait for first swing to stop
Stance animation
Stop stance
Second swing animation

white wasp
#

which animations are blending?

vivid spear
#

Second swing

white wasp
#

whats it conflicting with?

vivid spear
#

Im not sure, I assume its with the stance animation

#

Look at the video i sent, the swing just bounces back

white wasp
#

just find the animation that its conflicting with

#

either get all the playing tracks and print them or dont play the other animations 1 by 1

white wasp
#

to see when it stops then youl know its that animation thats causing it

vivid spear
#

What do I do when I find it?

rich monolithBOT
#

studio** You are now Level 3! **studio

vivid spear
#

The only other animation would be the Idle animation but the priority is set to "Idle" and its using the Animate script thingy