Enter Vehicle_SingleAnimation.js(28,15;48,14;49,15;49,65 ): BCE0048: Type ‘UnityEngine.Component’ does not support slicing.
line 28: MyVehicle.animation[EnterExitVehicle.name].speed = 1;
line 48: MyVehicle.animation[EnterExitVehicle.name].speed = -1;
line 49: MyVehicle.animation[EnterExitVehicle.name].time = MyVehicle.animation[EnterExitVehicle.name].length;
Can you show me the declaration for EnterExitVehicle and MyVehicle? Most likely you simply have to type it correctly. Dynamic typing in JS can save time, but it’s easy to break.