Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

2 comments

0

But that's exactly the same as what I already have.

0

no its not read it closely

This discussion is preserved as it was. New answers, comments, and votes are closed.