local TweenService = game:GetService("TweenService")
local door1 = script.Parent:WaitForChild("door1")
local door2 = script.Parent:WaitForChild("door2")
local TweeningInformation = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local door1Open = (CFrame = CFrame.new(-3.509, 6, -10.5))
local door2Open = (CFrame = CFrame.new(23, 6, -10.5))
local door1Close = (CFrame = CFrame.new(5.5, 6, -10.5))
local door2Close = (CFrame = CFrame.new(15, 6, -10.5))
local tween1Open = TweenService:Create(door1,tweeningInformation,door1Open)
local tween1Close = TweenService:Create(door1,tweeningInformation,door1Close)
local tween2Open = TweenService:Create(door2,tweeningInformation,door2Open)
local tween2close = TweenService:Create(door2,tweeningInformation,door2Close)
script.Parent.Detector1.Touched:Connect(function(hit)
tween1open:Play()
tween2open:Play()
wait(2)
tween1close:Play()
tween2close:Play()
end)
script.Parent.Detector2.Touched:Connect(function(hit)
tween1open:Play()
tween2open:Play()
wait(2)
tween1close:Play()
tween2close:Play()
end)
The doors are not sliding for some reason

5 comments
is there a specific problem?
like, does it teleport to a random spot, does it not tween, or something else?
Sorry, the doors are not sliding for some reason.
can you validate that it actually was hit?
Add a condition in it.