I'm trying to make a door open on a button push, When somebody pushes the button door 1 position and rotation will be the same as door 2's to give the impression that it swung open I am havening trouble finding the exact numbers, is there a way to do something like this
door1.postion = door2 postion
with this script?
local cframe = game.Workspace.Door1.PrimaryPart.CFrame
function onclick()
game.workspace.Door1:SetPrimaryPartCFrame(CFrame.new(240.909, 1.283, 221.164))
end
game.workspace.button.ClickDetector.MouseClick:Connect(onclick)

2 comments
game.workspace is deprecated. use workspace or game.Workspace instead. Also you can use CFrame.new() * CFrame.Angles(). Keep in mind that the angles are in radiants, not degrees.
I also agree with Dovydas1118. it should be .Workspace and you can just move the first part with CFrame.new() * CFrame.Angles() and set the angle. instead of changing it too a second part with SetPrimaryPartCFrame