Hey guys, so I’m currently working on a combat system, I’m currently trying to add animations, but there’s a little problem. My animations don’t transition smoothly sometimes also ovewrite one another. Does anyone know how I could make them transition smoothly between one another.
I want this :
Let me show you :
Here is the part of the script where I play the animations.
local M1 = {
Keybind = Enum.UserInputType.MouseButton1;
Settings =
{
TimeUntilComboReset = 2,
TimebetweenAttacks = .3,
CanAttack = true,
Attacking = false,
CurrAttack = 0,
};
Animations =
{
Attack1 = humanoid.Animator:LoadAnimation(anims.Attack1),
Attack2 = humanoid.Animator:LoadAnimation(anims.Attack2),
Attack3 = humanoid.Animator:LoadAnimation(anims.Attack3),
Attack4 = humanoid.Animator:LoadAnimation(anims.Attack4),
Attack5 = humanoid.Animator:LoadAnimation(anims.Attack5),
Hit1 = humanoid.Animator:LoadAnimation(anims.Hit1),
Hit2 = humanoid.Animator:LoadAnimation(anims.Hit2),
Hit3 = humanoid.Animator:LoadAnimation(anims.Hit3),
Hit4 = humanoid.Animator:LoadAnimation(anims.Hit4),
Hit5 = humanoid.Animator:LoadAnimation(anims.Hit5),
};
}
local anim = nil
if M1.Settings.CurrAttack == 1 then
anim = M1.Animations.Attack1
anim:Play()
elseif M1.Settings.CurrAttack == 2 then
anim = M1.Animations.Attack2
anim:Play()
elseif M1.Settings.CurrAttack == 3 then
anim = M1.Animations.Attack3
anim:Play()
elseif M1.Settings.CurrAttack == 4 then
anim = M1.Animations.Attack4
anim:Play()
elseif M1.Settings.CurrAttack == 5 then
anim = M1.Animations.Attack5
anim:Play()
end