Truck moves sideways when using transform.forward

unless i don’t rotate my truck at the start with my script or in my scene, it will go forward however if i do rotate it, it will go sideways

Protip: paste your code in your comment by using the little binary looking icon in the formatting options, alternatively if you’re on a new line you can insert a code block by pressing CTRL+K.

Unfortunately I’m not entirely sure why your object is going sideways. It would seem that for whatever reason your object isn’t using it’s local Z axis, but instead the world’s. Vector3.forward/transform.forward are positive on the z axis. If you view the object in the scene window, is it’s transform actually rotating to put Z forward, or are it’s local axis remaining aligned with the world?