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

help with an animation localscript for a tool please?

Asked by
Elixcore 1337 Moderation Voter
6 years ago
Edited 6 years ago

So I made this tool and i made 2 animations for it but i only know how to play one animation, does anyone know how to turn this script into a script for 2 animations?

i want to click once and it plays "right" then click after and it plays "left"


anim = 0 script.Parent.Equipped:connect(function() anim = 1 end) script.Parent.Unequipped:connect(function() anim = 0 end) game.Players.LocalPlayer:GetMouse().Button1Down:connect(function() if anim == 1 then local animTrack = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.right) animTrack:Play() end end) --right is the first animation and left is the second animation

Answer this question