I have a door here and I want it to smoothly rotate to a certain rotation. I know that I need to use CFrame and Lerp() to achieve what I want.
The problem is I am not sure what to actually do to achieve a "opening door" style rotation. If I rotate the casual way, the door will look "weird", if I rotate the door on the door's "rotating part" it will look like an actual door.
I have something like this going on:
local Door = script.Parent local RotatingPart = Door.RotatingPart local Angle = CFrame.Angles(0, math.rad(45), 0) RotatingPart.CFrame:Lerp(Angle, 1, 0.1)
I went on the cframe page for roblox and it showed something like :ToWorldSpace(), I'm not sure if I understand the whole thing but judging by the picture I could have a part that has the rotation and set the "hinge part" to that rotation relativity.
Do I use something like :SetPrimaryPartCFrame and use CFrame.Angles() to rotate the door or is there any flip-flop way to set it like a door "rotation"?
Thank you for viewing