Tween model while player moves

I have this view model that spawns well below the character, an animation is loaded then it tweens it up to the camera and then updates on RenderStepped.


However, if you move while all that is happening it doesn’t really look right and the model just appears on screen. I need it to basically move up into position so it looks smooth

local Tween = game:GetService("TweenService"):Create(
	self.ViewModel.HumanoidRootPart,
	TweenInfo.new(0.25),
	{
		CFrame = Camera.CFrame
	}
)
Tween:Play()
Tween.Completed:Wait()
	
self.Run = RunService.RenderStepped:Connect(function(deltaTime)
	self:Update(deltaTime)
end)
1 Like

As far as I am aware, the best way to approach this is to have some type of Weld or Motor6D linked to the body and Tween between the C0 of the Weld / Motor6D. I personally like using Motor6Ds, but it is up to you whichever you want to use. TweenService tweens between a static point A and a static point B in a given time, which means that if you move, point B does not change it’s position. That being said though, C0 (and C1) are relative locations based on Part0 and Part1 of the Weld / Motor6D, therefore if you Tween between the CFrame of those, it should work as you want it to work.

1 Like