How to make whees turn by using a spline

Sorry for the confusing description, I want the wheels to follow the splines direction i z (Yaw). I have already made the code for them to spin on the ground around the x and y axis. Thanks for the answers again!