How to smoothly move the player's character to specific location and have it face a specific direction?

https://streamable.com/0xlusv
I’m trying to bring the player into position infront of the heavy bag and face the character towards to bag before locking them in place. I tried doing this with tweens but as you can see, it’s incredibly glitchy in the clip.
The script(Excerpt):

local Character = Player.Character or Player.CharacterAdded:Wait()
	local Humanoid = Character:WaitForChild("Humanoid")
	local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
	
	local FrontPad = PromptObject.Parent.Parent.FrontPad
	local Bag = workspace:FindFirstChild("PunchingBag")
	local ProximityWall = Bag.ProximityWall
	local Info = TweenInfo.new(0.7,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)
	local Goal1 = {
		CFrame = FrontPad.CFrame
	}
	local Goal2 = {
		CFrame = CFrame.lookAt(HumanoidRootPart.Position,ProximityWall.Position)
	}
	local Tween1 = TweenService:Create(HumanoidRootPart,Info,Goal1)
	local Tween2 = TweenService:Create(HumanoidRootPart,Info,Goal2)
	HumanoidRootPart.Anchored = true
	Tween1:Play()
	Tween1.Completed:Wait()
	Tween2:Play()
	Tween2.Completed:Wait()
	HumanoidRootPart.Anchored = false

What’s causing this glitchiness and how can I fix this? Or is there a better way to doing this? With Bodymovers perhaps?

1 Like

to make the player face the bag you can use CFrame.lookAt(part.Position,target.Position)

the first param would be the one to make it look and second param is the target

Something else you could also do: disable the player input momentarily and use the humanoid MoveTo function. Although this adds room for errors like the path being obstructed, it will make the action look more realistic.

When tweening a part, the part being tweened must be anchored, or it won’t work properly.

He is already anchoring the part before playing the tween.

Late reply, just saw your post but how do I disable player input?

This post seems to have a good solution for that.