Is it possible to speedup slowdown imported animation?

I’m pretty noob with code.

I’m looking at importing animated models via fbx, of racers moving along fixed paths on a racetrack. I need to modify the playback speed of any of the racers at runtime. Been looking at “animationstate.Speed” but can’t get it to work on the imported animations.

Is it only for animation created in unity or can I affect the playback speed of animations imported into unity with the fbx assets?

var someNumber : float;
someNumber = .5;
animation[“walk”].speed = someNumber;

I’ve used this many times. Just note walk and someNumber are just there to give an example. Change them to whatever you need them to be.

EDIT: changed int to float