for i = 0,6,0.2 do
wait()
script.Parent.Door.PrimaryPart.CFrame = script.Parent.Door.PrimaryPart.CFrame * CFrame.new(0.125*(-i),0,0)
end
wait(1)
for i = 0,6,0.2 do
wait()
script.Parent.Door.PrimaryPart.CFrame = script.Parent.Door.PrimaryPart.CFrame * CFrame.new(0.125*(i),0,0)
end
It seems that you are just tweening the wrong axis, try:
for i = 0,6,0.2 do
wait()
script.Parent.Door.PrimaryPart.CFrame = script.Parent.Door.PrimaryPart.CFrame * CFrame.new(0,0.125*(-i),0)
end
wait(1)
for i = 0,6,0.2 do
wait()
script.Parent.Door.PrimaryPart.CFrame = script.Parent.Door.PrimaryPart.CFrame * CFrame.new(0,0.125*(i),0)
end
If not try this:
for i = 0,6,0.2 do
wait()
script.Parent.Door.PrimaryPart.CFrame = script.Parent.Door.PrimaryPart.CFrame * CFrame.new(0,0,0.125*(-i))
end
wait(1)
for i = 0,6,0.2 do
wait()
script.Parent.Door.PrimaryPart.CFrame = script.Parent.Door.PrimaryPart.CFrame * CFrame.new(0,0,0.125*(i))
end
for i = 0,6,0.2 do
wait()
script.Parent.Door.PrimaryPart.CFrame = script.Parent.Door.PrimaryPart.CFrame * CFrame.new(0,0,-0.125*(-i))
end
wait(1)
for i = 0,6,0.2 do
wait()
script.Parent.Door.PrimaryPart.CFrame = script.Parent.Door.PrimaryPart.CFrame * CFrame.new(0,0,-0.125*(i))
end