-- Ajedi32


speed = 0.25

door1 = script.Parent.SlidingDoor1
door2 = script.Parent.SlidingDoor2
open = script.open

function stateChanged()
	if open.Value then
		for i=1,(door1.Size.z/speed) + 1 do
			wait()
			door1.CFrame = door1.CFrame - (door1.CFrame.lookVector * speed)
			door2.CFrame = door2.CFrame - (door2.CFrame.lookVector * speed)
		end
	else
		for i=1,(door1.Size.z/speed) + 1 do
			wait()
			door1.CFrame = door1.CFrame + (door1.CFrame.lookVector * speed)
			door2.CFrame = door2.CFrame + (door2.CFrame.lookVector * speed)
		end
	end
end

open.Changed:connect(stateChanged)
