well i dont know how to do it but you can Download the minecraft then take the modeling file and rescript it
Or just rescript the current minecart we have now.
And I feel there needs to be a third category for vehicles/playertypes. Vehicles move in two local dimensions, three global dimensions, and rotate in all three dimensions. Playertypes move in three local dimensions but rotate in only two, I say we need a new class of spawned animations-where it moves in one dimension and rotates in one. This would be perfect for a minecart, goes forward/backward, and can go up and down slopes. This would disallow it to fall off a track.
JUST HAS A WONDERFUL THOUGHT.
A new spawn brick, just for this kind of vehicle, or an update to the current spawn. It has a normal spawn box that you choose the vehicle you want to spawn, then it has the usual copy color, collision, raycasting, and rendering. But the update would be check boxes, similar to the raycasting-collision-rendering, two main categories-Rotation, and Movement. Next to each main category name would be the boxes. There would be three boxes per main category-with labels that say "X", "Y", and "Z". Check the box if you want the vehicle to be able to move/rotate in that dimension. There would need to be some simple coding update to each vehicle but this would be extremely helpful for everything. And, if the creator of the vehicle doesn't want to add the coding update, then they don't have to, the check boxes just would not work.