Rotating Part On An Edge

Hello, I am trying to make a door, but the part isn’t rotating on the edge.

for i = 1 , 90, 1 do
	Door.CFrame = Point*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,Door.Size.Z/2)
	wait()
end

With the code above the parts goes like 1 stud to the front, and I don’t like it.

I want the part to be anchored, without using Hinge and be rotated using CFrame. (My objective is to tween it after I find the answer to this).
Is there anyway I can rotate the part on an edge?

One solution would be to make the door a model, and set its PrimaryPart to a part in the model that’ll be used as the origin of rotation, and then you can call :SetPrimaryPartCFrame() on the model to update its orientation.

Hope that helps. :slight_smile:

2 Likes