Hello!
This is kinda an extension of my last thread in a way, but I’m trying to make it so that when I open my door, (single door works just fine) in the case of a double door, clicking either door will open both doors. right now I have it opening one door at a time.
my single door uses this code
local door = script.Parent
local doorHinge = door.PrimaryPart
local doorOpen = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local doorCFrame = TweenService:Create(doorHinge, doorOpen, {
CFrame = doorHinge.CFrame * CFrame.Angles(0, math.rad(-100),0)
})
local doorCFrameClosed = TweenService:Create(doorHinge, doorOpen, {
CFrame = doorHinge.CFrame * CFrame.Angles(0, math.rad(0), 0)
})
local ClickDetection = door.ClickDetector
ClickDetection.MouseClick:Connect(function()
ClickDetection.MaxActivationDistance = 0
doorCFrame:Play()
door.Open:Play()
wait(3)
doorCFrameClosed:Play()
wait(0.5)
door.Close:Play()
ClickDetection.MaxActivationDistance = 24
end)