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?
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 ;>