How to keep models appearance the same but change orientation to 0, 0, 0?

My game loads in various models to function using :PivotTo(). Some of the models orientations are not 0, 0, 0 so when they are loaded in they appear sideways. I would use :MoveTo(), but it doesn’t work as :MoveTo() cannot move the model on top of other parts. I either need:

  1. A way to keep the models appearance the same and reset its orientation to 0,0,0.
    OR:
  2. A way to use :MoveTo() so it ignores other parts and moves on top of them.

All responses appreciated, thanks!

1 Like

In Studio using the Model tab go to the Pivot tool and click the Edit Pivot tool. Rotate the model’s pivot orientation, then click the Edit pivot tool off.

Another way is to set a PrimaryPart for the model that has the correct Orientation. If the Orientation is wrong then rotate the PrimaryPart to the correct Orientation and resize it to it’s previous dimensions in the correct axes.

I realized I am vastly overcomplicating this! When I pivot the model I can just set its orientation to its old orientation so it looks the same, even if it’s orientation isn’t 0, 0, 0. This solution came to me in a dream lol.

This code pivots the model to your desired position and then sets its orientation to its previous orientation by subtracting the Vector3 from the CFrame, leaving you with only the rotation left. CFrame is your Vector3 + your rotation, so when you subtract one from the CFrame, you are left with the other.

model:PivotTo(CFrame.new(2000,2000,0) * model:GetPivot() - model:GetPivot().Position)

1 Like