Why does my rigidbody rotate even though I froze rotation?

Hey there, I’ve run into this issue while trying to make a forklift simulator.
I’ve written some code that allows you to pick up and place a container onto the forklift.
It simply takes the gameobject of the container, parents it to a transform representing it’s location on the forklift, resets it’s position and rotation and disables it’s BoxCollider.

The forklift itself uses WheelColliders and physics to simulate “Realistic driving”, but I had to freeze the truck’s X and Z rotation to keep it from flipping over. This works, until I added the container.

As soon as you try to make a corner with the forklift, it starts tipping over and it keep rotating.
See image:
it just... rotates

There are no extra physics on the container. I tried disabling the boxcollider, ignoring it, setting IsTrigger to true or removing it outright. But it keeps rotating as such.

Can someone tell me why this happens, even though I’ve frozen rotation on the single Rigidbody in the hierarchy?

EDIT: I’ve added a container with no collider to the forklift in the editor and it didn’t show this behavior.
But when I do this at run time it still does…

EDIT 2: SOLVED… I’ve changed the code to disable the collider first BEFORE moving it onto the forklift.
That seems to have solved it, but it’s still strange to me… you’d think that all the code is ran at the same frame and wouldn’t interfere with each other like that…

I’m guessing, you have some script telling it to rotate…in which case it will override the restrictions you checked in the inspector… maybe because your wheel colliders are touching the parent colider and sending forces, since they are children, it overrides the settings… if you can’t find your mistake to set the rotation of the x/y axis each frame if it is not set to what you like… I guess, you accidentally set a parent child relationship incorrectly, referencing the wrong model… setting your angular drag very high, helps keep things from turning. My final and best guess is the same I already said… maybe because your wheel colliders are touching the parent collider. move them down so they do not intersect.

I have the same problem! I have a rigidbody with freeze rotations that i use for making a platformer movement. I made another movement that unfreezes his rotations and let the character to rotate like a ball. When i desactivate the roll movement, i reset his x and z rotations, and i freeze his rotations again, but the character falls down anyway.

Edit: I solved the issue setting the max angular velocity to 0.