wait(1)for m=1,30,1 do p.CFrame=p.CFrame+Vector3.new(-0.1,0,0)wait(.01)end
-- So in the example above, the door will move thirty times, with a distance of 0.1 every 0.01 seconds.
-- Feel free to mess around with values to try and get the door moving as smoothly as possible.
-- Remember, if the door is say 3 studs wide, you will have to move it 3 studs, like in the example above 0.1 x 30 = 3

wait(1) -- How long the door will remain open

for i = 1, 30 do
	p.CFrame = p.CFrame + Vector3.new(-0.1, 0, 0)
	wait(0.01)
end
