I have a script that's supposed to move a part. For some reason, it teleports it up. Why?
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
for i = 1, 52 do
local door1 = script.Parent.Parent.Door1
local x1 = door1.Position.X
local y1 = door1.Position.Y
local z1 = door1.Position.Z
local newx1 = x1 + .1
door1.Position = Vector3.new(newx1,y1,z1)
end
end)

1 comment
try using CFrame instead of vector3 positions as CFrames aren't affected by collisions and also try using tween service or CFrame lerp