So at first I put a part named main and a part named wall in a model. My script worked perfectly! As soon as I added a second part under the name "wall", the script no longer works. The script was never modified. I even deleted the 2nd "wall" and then it worked :l
p = game.Workspace.Model.main gamee = game.Workspace.Model:GetChildren() for i = 1,#gamee do if gamee[i].Name == "wall" then print("X:"..gamee[i].CFrame.X) while (p.Position.X) ~= (gamee[i].Position.X -4) do wait(.1) p.Position = p.Position + Vector3.new(1,0,0) end end end