How would I make the player move towards the position of a part using a BodyVelocity?

Hey there! I am trying to make a script where I can smoothly move the player towards a part using a BodyVelocity, but I have no idea how to do this. The script I currently use rotates the player towards the part, and then uses CFrame.LookVector to go towards the part. This isn’t exactly flawless, since the player can sometimes completely miss the part it’s going towards.

Any help is greatly appreciated!

1 Like
local Direction = (HumanoidRootPart.Position - Part.Position).Unit —this will give you the direction towards the part
HumanoidRootPart.BodyVelocity.Velocity = Direction * 100-- 100 is the spead
1 Like

I totally forgot about Unit! Thanks a lot.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.