Help with Lerp()

Hey there,
I’m trying to lerp my boat, but instead of moving to the destination, it moves to somewhere random in the void. I want it to sort of tween there instead.

Local Script:

	local goal = {}
	goal.CFrame = workspace.MainSystem.BoatTweens.End:FindFirstChild(boatModel.Name).PrimaryPart.CFrame
	
	boatModel.PrimaryPart.CFrame = boatModel.PrimaryPart.CFrame:Lerp(goal.CFrame, 30)

There are no errors. How can I make the boat slowly move, basically tween? Currently it just jumps to a random point in the void!

You’re using an alpha value of 30, meaning that your boat will be lerped far past the goal. You should use a value between 0 and 1.

2 Likes

Also, there’s no loop here. The lerp only moves it once, and that’s it. The alpha value should gradually increase from 0 to 1 in a loop, or on renderstepped, something like that.

Lerp allows to move between two points by a percent. You inputted value would equal to 3000%. It takes in values from 0 to 1. Like 0.5 for the middle.

You can do something similair to this by trying this:

Lerp(cframe, tick() % 1)

1 Like