When a locomotive (eg route 0M27) couples to stock with the following script, the resultant train is not set to its maximum speed. However, if the locomotive has its route set to 4M prior to coupling, the setting is made correctly. OnCouple() { string sClass; string s1Class; sClass=Train.GetRoute(); s1Class=Left(sClass,1); if(s1Class=="4") { Train.SetTrainMax(50/2.24); } }