Model not rotating on pivot point (scripts)

Hi guys! Not sure if this is the correct category, but tell me if I’m wrong. Simply, I am using a script to rotate and move an object. The issue? Well it is clearly seen that I have set the pivot correctly (to rotate around the hinges):


But, despite this, it phases through itself and doesn’t rotate how I would like it:


Any help would be very much appreciated.

I think this should be Scripting Support. Without a look at the door script I can only assume you’re trying to use pivot points and tell you to do :GetPivot() and :PivotTo().

Sometimes when using :PivotTo(), the part or model will end up rotating completely off center, so you might wanna update the CFrame after using :PivotTo(). Something like this:

Door:PivotTo(CFrame.Angles(math.rad(90), 0, 0))
Door.CFrame = CenterOfDoor.CFrame * Door.CFrame

Edit the values to suit your door.

Note: if the door is a model and not a part you wanna move, ensure that the model’s primarypart is set. Please also ensure that the pivot point is INSIDE of the part or model and not at the face or edges (unless intentional), otherwise the rotation will be completely off.

2 Likes

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