Animation Sequence without "bugging"?
So I have this script here that makes the dummy play the animation when a part is touched.
01 | local function onTouch(hit) |
02 | local animationId = 3248288444 |
03 | if (hit.Parent:FindFirstChild( "Humanoid" ) ~ = nil ) then |
04 | local animation = Instance.new( "Animation" ) |
06 | print ( "AnimationLoaded" ) |
07 | local PlayAnimation = game.Workspace.ScareActor.Humanoid:LoadAnimation(animation) |
09 | print ( "PlayingAnimation" ) |
13 | script.Parent.Touched:Connect(onTouch) |
the only thing is the animation starts over from the begining before it is finshed. So for example, if the animation is 3 seconds long, it would play 1 second, then start over before playing the 3 seconds of it. I know it sounds complicated but I need help if you understand. Thank you.
PS.
I tried wait() afterPlayAnimation:Play() and it didn't work.