Is there a way to Slow Down Animations during Gameplay? (C#)

Hey!

I was wondering what was going wrong with my script here.
As you can see, for the “PlayerModes” object, it has these lines of code to slow the animation down.

157185-knipse1l.png

It works perfectly in game! I was really happy that it worked out.
So I tried it on my other objects. Like this cop, for instance. I typed the exact same code, and made sure that the Animator was attached to the cop.

But all of a sudden… nothing. It doesn’t slow down at all. So what am I doing wrong? Thanks in advance!

Whoops! Accidentally put two ;'s there… that’s not the problem! I removed them, and it still doesn’t work. :slight_smile:

check SpeedUp() function in “if” condition

public void SpeedUp()
{
  Debug.Log(compAnimator.speed);
  if (time To Add < 1.75f) 
    {
    // ...
    }
}

anyway, this method you used is correct

I have no idea how that is supposed to fix a problem.