So I have a sword and I added in slash animations (official ones from a gear). Whenever you click, this runs after a bit of other code, but that all works - my problem is here.
num = math.random()*10 print("number: "..num) if num < 5 then anim = Tool.LeftSlash animTrack = hum:LoadAnimation(anim) animTrack:Play() print("animation played") else anim = Tool.RightSlash animTrack = hum:LoadAnimation(anim) animTrack:Play() print("animation played") end
Everything in here prints just fine, and it never errors, but it also never actually plays any animations. In case it helps, the AnimationIds are 74894663 and 74813494.
EDIT: I should also add that they do play if I just open up a test player (not in a server) in Studio.
--MightyWanderer
ok try this
num = math.random()*10 print("number: "..num) if num < 5 then anim = Tool.LeftSlash animTrack = hum:LoadAnimation(anim) animTrack:Play() print("animation play") else anim = Tool.RightSlash animTrack = hum:LoadAnimation(anim) animTrack:Play() print("animation played") end