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

Why is my animation only playing once, even thought it should work multiple times?

Heres the code for the animation

local biteanim = Instance.new("Animation")
biteanim.AnimationId = "rbxassetid://5638379797"
local biteanimTrack = humanoid:LoadAnimation(biteanim)

and heres the code when I play it in the function

biteanimTrack:Play()
wait(1)
biteanimTrack:Stop()

it plays once when the game starts and doesnt play again

3 comments

0

if it helps any, the function uses player:LoadCharacter() a few times

0

do you want it to loop? or do you want it to just play a few times

0

you can get animations to play?

1 answer

If you want the animation just to play a few times, not loop, you can do:

biteanimTrack:Play()
biteanimTrack.Looped = true

wait(put how long you want the animation to last in seconds here)

biteanimTrack.Looped = false
biteanimTrack:Stop()

If you want the animation to loop then use:

biteanimTrack.Looped = true
biteanimTrack:Play()

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