How do I rotate a model on a fixed point? (And how do I make it do that when a player touches the model?)

I want to make it so when a model rotates with the script I put in it it rotates around a fixed point. The model is a door so that should help with what it might look like.
I am unsure how to rotate the model around a fixed point but I do know how to rotate a model although it isn’t the best way.

local model = script.Parent
local rad = math.rad
local rotateAmount = -90

task.wait()
local newCFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, rad(rotateAmount), 0)
model:SetPrimaryPartCFrame(newCFrame)

I looked on here but couldn’t find an answer that both applied and that I could understand.

1 Like

Could you use a hinge constraint to simplify your life?

1 Like

No idea what that is. [Character Limit]

1 Like

For example, something like this: Building a Hinged Door | Roblox Creator Documentation

1 Like