Converting :Lerp to a tween

So I am currently trying to make a simple FPS game to practice development and ive came into a issue. Using the tutorial that ive used to assist me they use :Lerp to change the position of the gun. I found that lerp works but not very well, its a bit buggy and does not always play correctly. The goal is to convert to tweens.

When the player begins to sprint:

sprintcf = sprintcf:Lerp(WeaponData.SprintCFrame,0.2)

WeaponData.SprintCFrame referring to the module script that has

module.SprintCFrame =,-0.25,0) * CFrame.Angles(0,math.rad(55), 0)

For converting this into a tween ive come into an issue.

local TI =
	local tween = Tween:Create(sprintcf, TI, WeaponData.SprintCFrame)

Ive tried some different variations of this and none seem to work. Could I get some help?

  • Alex
1 Like

The TweenService:Create function requires an Instance to manipulate - not a variable (sprintcf).

For example - you can manipulate the CFrame of a Part using the TweenProperties:

local part = game.Workspace.Part
local tweenInfo =
local tweenProperties = { CFrame =, 5, 0) }
local tween = Tween:Create(part, tweenInfo, tweenProperties)

but you cannot do the same to a variable.

Lerps are also usually used in junction with a loop as well, because, looking at your code, Lerp(cf, 0.2) will only get you 20% to your desired cframe if you called it one time.

Whereas Tweening will run in its own loop toward the desired values.
So if you have a loop using the Lerp at the moment, you’ll need to swap that out.

1 Like