Sprint Script Bug

(people were stealing scripts so i’d like my scripts to be cleared.)

I’ve also added a white true do to detect if the character has been ragdolled, in such a case it would stop all animations then it would do the process that happens above. Yet it still bugs out when it happens.

You Might be able to do something like this:

Character:FindFirstChild("Animate").Run.RunAnim.AnimationId = "Your Sprinting Animation ID"

After you are done sprinting:

Character:FindFirstChild("Animate").Run.RunAnim.AnimationId = "Your Original Animation ID"

The thing is that’s not even the issue, the run anim works fine and everything it’s when I stop/or I get ragdolled it CONTINUES playing after I’ve stopped it.

the reason for this is because child isnt specified nor does :GetPlayingAnimationTracks() know what its getting, youre just getting the table of Animations Playing, without specifiying what animation you want to stop.

I’m looping through all playing animation tracks inside of the humanoid, the “name” is the index, the “child” is the value, the same as for i, v except named different, GetPlayingAnimationTracks gets all current player animation tracks, therefore I can :Stop() them all with one simple function.

Why don’t you just get a direct reference to the running animation and toggle it from there? Would be a lot easier and less confusing than iterating through all current animations

1 Like

I’ll go and try that right now hopefully it works (rescripted the main system)

Still doesn’t work and the error is occuring.

Why are you disabling the script

For debounce/cooldown time, this is after the animations are supposed to be “stopped”

your disabling the script before stopping animations

I’ll instead of disabling the script will make a debounce system rather than stopping the script to see if that makes any changes.

I will get back to you soon.

Still having the same issue, unfortunately.

It would be easier to understand the code if you can copy and paste it and put it in a lua format in the topic.

`` `
redacted due to scripts being stolen.

1 Like

Try making Character.Humanoid:LoadAnimation(script.Parent.Parent.Parent.Animate.idle.Animation1):Play() into a variable, you can stop it later when needed. As @DataSigh said.

I don’t see why it wouldn’t work.

1 Like

It’s the run animation that is causing it to break.

1 Like

Oh, mb.

It seems that your walking and idle animations are both only controlled when button actions occur, I recommend that you revamp this script from the ground up and begin using Humanoid States and checking their value’s outside of the Input Began Events.

Sorry, but I’m just not sure how else I can help.

1 Like