PivotTo() Not Updating Models/PrimaryParts Orientation

  1. Update The Model/PrimaryParts Position Within the Properties

  2. PivotTo() Not Updating Models/Primary Parts Orientation

  3. Tried Almost Everything I could think of.

I’m currently working on a system that rotates a model using PivotTo in my Roblox game. Visually, the model rotates correctly in the game, but when I check the properties of the model or its PrimaryPart, the orientation doesn’t update. Here’s what I’m doing:

This is how the Part/Preview is rotated:
Preview.PrimaryPart:PivotTo(Preview:GetPivot() * CFrame.Angles(0,math.rad(90),0))

Visually, the model rotates in the game, but the rotation/CFrame of the PrimaryPart in the properties window doesn’t seem to change.

I also tried printing out the CFrame and tried storing the CFrame inside of a CFrameValue of the PrimaryPart, and it doesn’t reflect the rotation either.

Has anyone experienced this issue? Am I missing something with how PivotTo works, or is there another way to ensure that the model’s orientation is properly updated both visually and in the properties panel?

Any advice or suggestions would be greatly appreciated!

Thanks!

PivotTo() Is just MoveTo() but it moves the object to the position if there is an object there or not.

Thanks for the clarification! Just to confirm, PivotTo() actually moves and rotates the entire model around its pivot point, which is different from MoveTo(), which only changes the position of the PrimaryPart. I want to rotate my model without affecting its physics, so PivotTo() seems to be the better option. Just wanted to clear that up!

If you want to rotate an object and the cframe change then use Cframe.Rotation.

I can’t directly use CFrame.Rotation to manipulate the Cframe because it’s not valid.

You have to get the Cframe of the objects rotation.

Check the documentation.
PVInstance | Documentation - Roblox Creator Hub
Isn’t this what you’re dealing with:
Note that for efficiency purposes, Instance.Changed events are not fired for Position and Orientation of BaseParts moved in this way; they are only fired for CFrame.

The issue is that PivotTo() was continuously running which reset the orientation every second which for some reason allowed the model to rotate visually but the properties of orientation always showed 0,0,0

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.