local function DoorOpen()

  local movement_time = 5
  local studs_up = .4
  local i = 0

  for j = 1, 2 do
    while i < movement_time do
      script.Parent:TranslateBy(Vector3.new((studs_up / (movement_time / 1)), 0, 0) * (j == 1 and 1 or -1))
      i = i + wait()
    end
    i = 0
    if j == 2 then
      break
    end
    wait(10)
  end
end

while true do
wait(10)
DoorOpen()
end

When the model in which the script is found retracting, it somewhat randomly decides when to stop, making the model misplaced from its original position.