Well to answer where the script should go, it could go anywhere, but it is probably easiest to parent it under the “Door” model. Then connect both click events inside that one script, and then insert the code that does the actual opening and closing.
If you need anything, or have any specific questions, let me know!
Just reply with any information about what you are trying to do, and I will do my best to help you out.
Have a good day as well, and if you celebrate it, Happy Halloween.
@SetDefaultDev put this as a local script and inside the door model
local Hinge = script.Parent.PrimaryPart
local opened = false
function OpenDoor()
if opened == false then
opened = true
for i = 1, 21 do
script.Parent:SetPrimaryPartCFrame(Hinge.CFrame*CFrame.Angles(0, math.rad(5), 0))
wait()
end
else
opened = false
for i = 1, 21 do
script.Parent:SetPrimaryPartCFrame(Hinge.CFrame*CFrame.Angles(0, math.rad(-5), 0))
wait()
end
end
end
script.Parent.Handle1.ClickDetector.MouseClick:Connect(OpenDoor)
script.Parent.Handle2.ClickDetector.MouseClick:Connect(OpenDoor)