Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Tryna make an animation play after using another, Help please?

Asked by 10 years ago

I am trying to make an animation attack play after another animation attack using Button1Down. Similar to Roblox '"ClassicSword", how it has a lunge attack after it's slash. I need help coding this please.

local animation = Instance.new("Animation")

animation.AnimationId = "rbxassetid://188046705"


game.Players.LocalPlayer:GetMouse''.Button1Down:connect(function()

local character = Player.Character

animTrack = character:WaitForChild("Humanoid"):LoadAnimation(animation)

animTrack:Play()
end)

if animation.AnimationId == nil then

local animation2 = Instance.new("Animation")

animation2.AnimationId = "rbxassetid://188253235"

game.Players.LocalPlayer:GetMouse''.Button1Down:connect(function()

local character = Player.Character

animTrack = character:WaitForChild("Humanoid"):LoadAnimation(animation2)

animTrack:Play()


end)
end

Answer this question