Hi, I made a script to resize a part and move another part, the problem I'm having is the part won't stop moving even though I've coded it to stop when the Position is at a certain Position, and yet the part still carries on Moving even after it's reached the position.
Here is the script:
local MDoor = script.Parent
local handle = script.Parent.Parent.Handle
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg == "Open Door" then
repeat
MDoor:Resize(Enum.NormalId.Bottom,- 0.5)
wait(0.2)
until MDoor.Size.y <= 1
end
repeat
wait(0.2)
handle.Position = handle.Position + Vector3.new(0, 0.7, 0)
until handle.Position.y == 17
end)
end)
I tried using "MoveTo" but it didn't seem to work.
Any sort of help is greatly appreciated, Thanks.

2 comments
.7 doesn't go into 17 evenly, which means it'll never reach 17 exactly, it'll surpass it.
Thanks, That was a very dumb mistake on my part.