SetPlaybackRate not working on players

So I’ve hooked into UpdateAnimation and tried to set the playback rate of an animation to 0.25 and it’s not changing it. The animation is being called through CalcView properly, it’s just the speed. The function in the hook is simply this

if ply:IsRolling() then
   ply:SetPlaybackRate( 0.25 )

I’ve gotten it to work before but it required me overwriting the default GMod UpdateAnimation which isn’t something I want to do here.

If your trying to slow the player down have a look at this


Nah what I’m trying to do is slow down an animation I’ve run through calcmainactivity. I don’t need the player movement slowed down just the sequence.

Like I said, I’ve done this before using these two functions but I had to overwrite the default updateanimation. I’m trying to perform this through hooks with no luck

Well you have to supress the default code for GM:UpdateAnimation while your sequence is running because otherwise the animation speed will be reset every frame from GM:UpdateAnimation.

You can do this via a hook by returning true only for the duration of your animation and otherwise not returning anything

Shit yep, completely forgot the return true. Works great now!