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

Why won't my animations run in Player/Studio Test Server?

Asked by 10 years ago

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

1 answer

Log in to vote
0
Answered by 10 years ago

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

0
But that's exactly the same as what I already have. MightyWanderer 30 — 10y
0
no its not read it closely danielsarabia11 -2 — 10y
Ad

Answer this question