local Door = game.Workspace.Door
local Origin = game.Workspace.Origin
i = 0
while wait() do
i = i + 1
Door.CFrame = CFrame.new(Origin.Position) * CFrame.Angles(0,math.rad(i),0) * CFrame.new(0,0,Door.Size.Z/2)
end
.
local Door = game.Workspace.Door
local Origin = game.Workspace.Origin
i = 0
while wait() do
i = i + 1
Door.CFrame = CFrame.new(Origin.Position) * CFrame.new(0,0,Door.Size.Z/2) * CFrame.Angles(0,math.rad(i),0)
end
The first code works, it rotates around a set point, while the second one does not. Why does the second one not work but the first one does?

1 comment
You use CFrame.Angles first in the first one, that could possibly have an effect on the way its placed.. example: 1+(2*3) vs (1+2)*3