LookVector and tweening?

Trying to make a part tween to a position that is 15 studs in front of it using look vector, however it is tweening to a random spot that is not on the line of any of the vectors (right, up, look).

local TweenService = game:GetService("TweenService")
local Trap = script.Parent

local tweenInfo = TweenInfo.new(5)
local Tween = TweenService:Create(
	Trap,
	tweenInfo, 
	{Position = Trap.CFrame.LookVector * Vector3.new(0,0,15)})

Tween:Play()
1 Like
	{Position = Trap.Position + Trap.CFrame.LookVector * Vector3.new(0, 0, 15)})

Edit: Looking back on this a year later, I don’t think this will work. I think you want

	{Position = Trap.Position + Trap.CFrame.LookVector * 15})
7 Likes

is it possible to do it with a model?

Sadly, it is not possible. It is best to either union the model (if it’s not a mesh part) then tweening it, or tween each part within the model separately. However, respectively you may also convert it into an FBX file then reimport it back into studio, which you then can tween it from there.

1 Like