i want the uppercut animation to play if the combo is 4 and the character has a boolvalue named uppercut but it doesnt work like this
if combo == 1 then
animation = animator:LoadAnimation(animations.a1)
elseif combo == 2 then
animation = animator:LoadAnimation(animations.a2)
elseif combo == 3 then
animation = animator:LoadAnimation(animations.a3)
elseif combo == 4 and character:FindFirstChild("uppercut", true) then
animation = animator:LoadAnimation(animations.uppercut)
else
animation = animator:LoadAnimation(animations.a4)
end
the else in the script apply for the first if then statement so probably this would work
if combo == 1 then
animation = animator:LoadAnimation(animations.a1)
elseif combo == 2 then
animation = animator:LoadAnimation(animations.a2)
elseif combo == 3 then
animation = animator:LoadAnimation(animations.a3)
elseif combo == 4 and character:FindFirstChild("uppercut", true) then
animation = animator:LoadAnimation(animations.uppercut)
elseif combo == 4 and not character:FindFirstChild("uppercut") then
animation = animator:LoadAnimation(animations.a4)
end
it still doesnt work it plays a1 trough a3 then its still a4 instead of uppercut
ok so, can you show me the full script?
Did you check that uppercut is a descendant of the player character? Also recently, sometimes animations doesn’t play somehow, as far as i know that’s roblox studio bugs.
the animation is in a folder in replicated storage
no i meant this character:FindFirstChild("uppercut")
, the a4 animation of yours plays which means the script couldn’t find character:FindFirstChild("uppercut")
in the character
yes, the uppercut exists in the character