So, I have been attempting to create a door that opens upon touching it, making it seem more authentic. Here's the code, the movement works, however every time the function is fired, the door teleports right above the house and continues the movement but in the wrong place.
local door = script.Parent.Part
function dooropening(plr)
plr.Anchored = true
for i = 1, 10 do
wait(0.1)
door.CanCollide = false
door.Anchored = true
door.Position = door.Position + Vector3.new(0.1, 0, 0.1)
door.Rotation = door.Rotation + Vector3.new(0, 10, 0)
end
end
script.Parent.Part.Touched:connect(dooropening)
Any advice is much appreciated.

4 comments
For the position, try CFrame.
The above is the solution, I'm not sure why he didn't answer so I'll provide a demonstration along with his ^ answer.
I didn't see your answer, I have attempted CFrame but the Output states that CFrame produced an error and Vector 3 was expected
I was working on it xD It's finished now.