Animation.speed issues

Certain animations on my character don’t want to change speed, this is the code I use to change the animation speed. mWeapons is a array to hold all the different melee weapons my character has, each weapon has three attack animations so that’s what the different strings are for, they hold the animation names, playing animations works fine, but I can’t seem to get the speed to change, I’ve tried everything from -1 to 10000 but nothing works.

var mWeapons : Transform[];
var mAttack1s : String[];
var mAttack2s : String[];
var mAttack3s : String[];
var Aspeed : float = 2.0;

function Start(){
for(var c = 0; c < mWeapons.length; c++){
animation[mAttack1s[c]].speed = Aspeed;
animation[mAttack2s[c]].speed = Aspeed;
animation[mAttack3s[c]].speed = Aspeed;
}
}

After this didn’t work I tried just doing one weapon to test it out with this code.

function Start(){
animation["hAttack1"].speed = Aspeed;
animation["hAttack2"].speed = Aspeed;
animation["hAttack3"].speed = Aspeed;
}

But that didn’t work either, is there a problem with either of my scripts?

animation[“hAttack1”] is of type AnimationState and the animation sequence is correctly named hAttack1? Then this should work fine, I can’t see a problem with your code. Maybe you change the speed elsewhere?

Yeah I double checked the name like a hundred times, I looked through the script to make sure it wasn’t changed anywhere else either. I’m gonna try something and I’ll post back here after.