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

Tryna make an animation play using Button1Down(UNSOLVED)help please?

Asked by 10 years ago

I am trying to have a Tool when you Left Click, it will Insert an Animation and Play() the animation and it is in a localscript, however I am having issues with coding the script can somebody please help?. Also how would I make it Play three other animations once the mouse is clicked continuously?

local animation = Instance.new("Animation")

animation.AnimationId = "rbxassetid://188046705"

Charact = script.Parent.Parent.Parent

function BasicAttack()

    local character = Player.Character

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

        animTrack:Play()

end

game.Players:GetPlayerFromCharacter(Charact):GetMouse().Button1Down:connect(BasicAttack)


Answer this question