I need this model to stand up the correct way

I have a sort of problem with moving a part. Basically, I’m moving this model to the tray, but it’s facing the wrong way. I’ve been trying many things, and I’ve found that Origin Orientation is not available to be edited in a script. I’ve tried CFrame.Angles, but it doesn’t seem to be working.

Here’s the part of the script that’s moving the model to the specific spot:


Here’s an image of the result:

I’ve tried things like:


But they just cause the script to not work, aka the rest of the script isn’t run, and it seems to be stuck at that part because of an unstated error.

1 Like

Try multiplying CFrame.Angles?

pastryClone:SetPrimaryPartCFrame(CFrame.new(Vector3.new(tray.Position.X,tray.Position.Y+1,tray.Position.Z)) * CFrame.Angles(0,-90,0))

The error would be handy to see as well

Thanks, that worked.

I meant here that there were no shown errors

CFrame.Angles requires a value in radians. Also multiplying as @Jackscarlett said, so just wrap your desired angle in math.rad()


Also little FYI for organizational purposes, you don’t have to pass a Vector3 to CFrame.new, just the first 3 values work.

-- is the same as

Origin Orientation is a relative property of Model.WorldPivot, this property value is a CFrame. If the part is facing the wrong way; you can try things depending on your scenerio.

To create a CFrame that faces a specific direction, you can use CFrame.new(Vector3 Origin, Vector3 LookAt) and it should return a CFrame value that corresponds with this expectation.