I'm currently scripting the beginnings of a kart-racing game. Currently I can make the carts turn accurately when they are on level ground. I can't, however, figure out how to accurately make them turn on surfaces such as walls or hills. Intended behavior on surface with upvector == (0, 1, 0): https://streamable.com/c5h1ju Turning behavior on surface with upvector (1, 1, 0): https://streamable.com/q312n4
This is the code I'm using to turn the vehicle
local upv, theta = self.CFrame:ToAxisAngle()
self.CFrame = self.CFrame * CFrame.fromAxisAngle(self.CFrame.UpVector, self.InputVector.X*step*self.TurningRadius)
This is being ran on renderstepped. Let me know if you have any questions about the code or anything else. Thanks, Gladii

3 comments
Hey, thanks for the commment. There are still some issues. The second answer doesn't really work, it produces a similar result to what I had. The first answer produces a different results. The cart rotates well, but on the wrong plane. Here is a video showing what happens with the first solution: https://streamable.com/ogczig . The cart is rotating "absolute" instead of "relative".
I had a similar initial solution to 1 at first, but I ran into the problem that is currently has which is why I tried to switch to something similar to 2.
Update: self.Cframe was being somehow overset by re-notating it later in the script. After notating it differently, it works now. thanks.