I've come up with a script, but unfortunately, it rotates the entire door, I want it to rotate on a pivot point, so it emulates a door actually opening. I don't know which steps to take from here, any help?
local door = script.Parent local main = door.Main local button = script.Parent.MainDoor local open = false button.ClickDetector.MouseClick:Connect(function() if not open then for i = 0, 10, .3 do print(i) door:SetPrimaryPartCFrame(door:GetPrimaryPartCFrame() * CFrame.Angles(0, math.rad(math.pi*0.9), 0)) wait() end end
Place a Part in the model and use it as a axis by making that your primary part. If the part is on the side of the door, it will rotate the door on the side instead of the center.