Smoothly positioning player to another part

On W pressed, the player moves to the tile in front of them, however, the player seems to clip into the new tile when moving them to the next tile.

player.Character.HumanoidRootPart.CFrame = +, player.Character.Humanoid.HipHeight, 0))

I think u gotta add a small offset so the player doesn’t get CFramed into the part as much, maybe a stud or two higher would resolve your issue.

If you read my OP, you would have noticed I tried to offset the value using Humanoid.HipHeight. The result is as shown in the video.
I’d prefer if the offset used is the exact value of the HumanoidRootPart from the ground.

You can use TweenService to move the character CFrame to the desired CFrame.

Never mind, I literally just solved my own problem with my reply.
I simply added the y value of my HumanoidRootPart.Position to the new tile position and it works perfectly fine.

player.Character.HumanoidRootPart.CFrame = +, player.Character.HumanoidRootPart.Position.Y, 0))

That is entirely different from what the title or OP states. Be sure to clearly state what you need, or you will get mixed answers like the replies above.

This is because you were changing HumanoidRootPart’s position, not the full Character’s one.

Also, you can use :MoveTo(), this function will automatically position the Character on top of the part at the exact height without having to use Humanoid’s HipHeight.

1 Like

No this is exactly what I stated in my original post.

Please read properly before commenting next time.

Definitely more elegant than my solution, thank you.

Alternatively you can use SetPrimaryPartCFrame() or PivotTo() which will both retain the original orientation of the character model, MoveTo changes a model’s positional data only.