local ClickDetector = script.Parent.ClickDetector
open = false
LGate2 = script.Parent.LGate2
RGate2 = script.Parent.RGate2
Increment = 180
ClickDetector.MouseClick:Connect(function (player)
if player:GetRankInGroup(4853203) >= 10 then
script.Parent.ClickDetector.MouseClick:Connect(function()
if open == false then
open = true
for C = 1, Increment do
wait()
LGate2.PrimaryPart = LGate2.hinge
RGate2.PrimaryPart = RGate2.hinge
LGate2:SetPrimaryPartCFrame(LGate2.PrimaryPart.CFrame * CFrame.fromEulerAnglesXYZ(0,math.rad(-110/Increment),0))
RGate2:SetPrimaryPartCFrame(RGate2.PrimaryPart.CFrame * CFrame.fromEulerAnglesXYZ(0,math.rad(110/Increment),0))
end
elseif open == true then
open = false
for C = 1, Increment do
wait()
LGate2.PrimaryPart = LGate2.hinge
RGate2.PrimaryPart = RGate2.hinge
LGate2:SetPrimaryPartCFrame(LGate2.PrimaryPart.CFrame * CFrame.fromEulerAnglesXYZ(0,math.rad(110/Increment),0))
RGate2:SetPrimaryPartCFrame(RGate2.PrimaryPart.CFrame * CFrame.fromEulerAnglesXYZ(0,math.rad(-110/Increment),0))
end
end
end)
end
end)
My script to open a door isn't working. This is where everything is located: https://prnt.sc/r9rgvp
There are two doors with 1 script each. I have a left and a right door.

3 comments
Thanks so much! I did this to both scripts but... the interview door isn't working.
Nevermind, you just have to double click the button and it opens. Thanks for the help!
No Problem :D