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

how to stop Humanoid walk animation when moving with CFrame and state is physics?

I'm creating a minecart script that moves a player by adding a minecart as an accessory, which is moved with CFrame tweens. That's all working nicely, but how do I stop the player from doing a walking animation while moving in the minecart? It feels like putting a humanoid in "Physics" state should already stop that. I've also tried enabling PlatformStand, which doesn't work either. I don't have reason to include the code, because nothing is wrong with it. I'm simply asking, how do you stop a humanoid from running the walk/run animation at all, for a set period of time?

1 comment

0

Take a look at PlatformStand.

1 answer

Well what do you know, I found it out. For the sake of the internet and those after me, here is the solution for this problem. If you want to have the character in a state where it cannot move conventionally, but walking anims are still overriding when you change it's CFrame constantly, you'll have to force upon it an idle animation that is paused. Because most character animations override the idle animation, this state will be overridden immediately once the character is freed from this state. Here is the code, assuming the player is already defined:

idle = Player.Character.Humanoid:LoadAnimation(Player.Character.Animate.idle.Animation1)
idle:AdjustWeight(9) --This is the default idle weight
idle:Play()
idle:AdjustSpeed(0) --A speed of 0 pauses the animation

If you happen to stop by and this solution helps you, please give me upvotes ;>

1 comment

0

For some reason, the scripthelpers code viewer is cutting off line 1. Be sure to view the source; it's Animation1 and the parentheses should be closed.

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