Character explodes when I use CFrame.lookAt() on the HumanoidRootPart

Here is the code handling it:

			local cf = rover.HumanoidRootPart.CFrame;
			local p = rover.HumanoidRootPart.CFrame.Position;
			local p2 = Vector3.new(waypoint.Position.X,p.Y,waypoint.Position.Z);
			print(p2);
			local lookat = CFrame.lookAt(p,p2);
			print(lookat);
			pa.CFrame = lookat;
			rover.HumanoidRootPart.CFrame = lookat;

When I print p2 it doesn’t show anything abnormal. Here is a video of minor exploding (It lags out my computer when it fully explodes so I can’t capture that) and I censored the character with a green part (that can’t collide or touch) so no-one steals the concept:

Sometimes the parts fly apart and lag out my computer. Others it just has small spasms. In the video you are seeing very small spasms in comparison to the usual ones.

Here is a test with the same script with an r6 rig, it flings it self rather than exploding:

EDIT:
After some experimentation I at least got the tweenservice positions rendered (In neon red). Where the R6 dummy landed is highlighted in the box:

Your post doesn’t really explain what’s going on at all. It looks as though you’re trying to use Waypoints to move a character. You’d have to explain what you mean by exploding.

Sometimes the parts fly apart and lag out my computer. Others it just has small spasms. In the video you are seeing very small spasms in comparison to the usual ones. I would record the larger ones if it didn’t freeze my computer.

It’s fairly hard to see due to the green part blocking what is happening. Are you using MoveTo() for the waypoint movement?

1 Like

No I am using this:

TweenService:Create(rover.HumanoidRootPart, TweenInfo.new(1), {Position = Vector3.new(waypoint.Position.X,rover.HumanoidRootPart.Position.Y,waypoint.Position.Z)}):Play();

Okay I fixed the exploding problem. I forgot to update the position every waypoint before CFrame.lookAt()ing so it was resetting it’s position back to the start every waypoint.