Problem with MoveTo, any ideas?
Usually I don't have a problem with MoveTo, but as I try to move a model in this script it flickers from side to side, which ruins the entire effect. Is there any other way to move the model, or is there a mistake I'm making which is screwing up MoveTo?
01 | local xpos = Workspace.Model.Base.Position.x |
06 | for i = Workspace.Door 1. Position.X, Workspace.Door 1. Position.X - Workspace.Model.Base.Size.X/ 2 , - 0.2 do |
07 | Workspace.Door 1. Position = Vector 3. new(i, Workspace.Door 1. Position.Y, Workspace.Door 1. Position.Z) |
13 | for i = Workspace.Door 2. Position.X, Workspace.Door 2. Position.X + Workspace.Model.Base.Size.X/ 2 , do |
14 | Workspace.Door 2. Position = Vector 3. new(i, Workspace.Door 2. Position.Y, Workspace.Door 2. Position.Z) |
19 | for i = Workspace.Model.Base.Position.Y, Workspace.Door 1. Position.Y, 0.1 do |
20 | Workspace.Model:MoveTo(Vector 3. new(xpos, i, Workspace.Model.Base.Position.Z)) |